dadapas/mvola-php
Composer 安装命令:
composer require dadapas/mvola-php
包简介
A simple class wrapper for MVola mobile money for Madagascar.
README 文档
README
PHP class wrap up Madagascar mobile money request as mvola.
This package facilitate these features for you:
- Handle authentification token and expires token
- Generate automaticly correlation ID and reference for payement
- Request handler
Getting started
The suggested installation method is via composer:
composer require dadapas/mvola-php
To get started
require_once __DIR__ . "/vendor/autoload.php"; use MVolaphp\Telma as MVola; $credentials = array( // Customer id 'client_id' => '<customer_id>', // Customer secret 'client_secret' => '<customer_secret>', // The merchant number 'merchant_number' => '0343500003', // Set true to production 'production' => false, // company_name 'partner_name' => "company_name", // Set the lang 'lang' => 'MG' ); // Path to cache that is enable to read and write $cache = __DIR__.'/cache'; try { $mvola = new MVola($credentials, $cache); // ... } catch (MVolaphp\Exception $e) { echo $e->getMessage().PHP_EOL; var_dump($e->getData()); }
Sending money to merchent like
use MVolaphp\Money; use MVolaphp\Objects\{Phone, PayIn, KeyValue}; ... $payDetails = new PayIn(); // Amount of 1000 ar or arivo ariary $money = new Money('MGA', 5000); $payDetails->amount = $money; // User to retreive the amount $debit = new KeyValue(); $debit->addPairObject(new Phone("0343500004")); $payDetails->debitParty = $debit; // Credited party not obligatoire if has been set in options // $merchant = new KeyValue(); // $merchant->addPairObject(new Phone("0343500004")); // $payDetails->creditParty = $merchant; // Set description text $payDetails->descriptionText = "Test payement"; $meta = new KeyValue(); $meta->add('partnerName', "Company name"); // $meta->add('fc', 'USD'); // $meta->add('amountFc', 1); // Add metadata information $payDetails->metadata = $meta; // Put callback url $mvola->setCallbackUrl("https://example.com/mycallback"); // Make a payement $response = $mvola->payIn($payDetails); print_r($response);
For testing only msisdn 034 35 000 03 and 034 35 000 04 work
Use real number for production
Support
This repository is support to all php project, Symfony, Laravel, Codeigniter, Wordpress, ..., and so on
Documentation
To read the documentation is in
Contributing
Please read the CONTRIBUTING.md contents if you wish to help out!
LICENCE
MIT Licence
dadapas/mvola-php 适用场景与选型建议
dadapas/mvola-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 363 次下载、GitHub Stars 达 10, 最近一次更新时间为 2022 年 05 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「library」 「php-sdk」 「mobile-money」 「mvola」 「madagascar」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 dadapas/mvola-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dadapas/mvola-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 dadapas/mvola-php 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This is simple PHP Package to interact with Moneroo API.
Inbox pattern process implementation for your Laravel Applications
Pesa PHP SDK
Core components for the Recsys PHP payment processing library
Core library that defines common interfaces used by the rest of the intahwebz..
Amqp classes
统计信息
- 总下载量: 363
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-05-07