baffouradu / mazzuma
Mazzuma支付网关的库
0.0.6
2018-08-11 20:02 UTC
Requires
- php: ~5.6|~7.0
Requires (Dev)
- phpunit/phpunit: >=5.4.3
- squizlabs/php_codesniffer: ^2.3
README
这是一个用于消耗Mazzuma支付API以在PHP应用程序中发送或接收移动货币的库。
安装
通过Composer
$ composer require baffouradu/mazzuma
用法
require "vendor/autoload.php"; use \BaffourAdu\Mazzuma\MazzumaPayment; //Replace this with API key as obtained from https://dashboard.mazzuma.com/ $APIKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"; $payment = new MazzumaPayment($APIKey); try { $response = $payment->transfer('MTN_TO_MTN') ->amount(1) ->from('05xxxxxx') ->to('02xxxxxx') ->send(); if ($payment->isSuccessful()) { /* $response holds the original structure of Mazzuma's API Response */ echo json_encode($response); } else { /* $response holds the original structure of Mazzuma's API Response */ echo json_encode($response); } } catch (Exception $e) { echo 'Message: ' .$e->getMessage(); }
变更日志
有关最近更改的更多信息,请参阅变更日志。
测试
$ composer test
贡献
安全
如果您发现任何安全相关的问题,请通过电子邮件baffouraduboampong@gmail.com联系,而不是使用问题跟踪器。
致谢
许可证
MIT许可证(MIT)。有关更多信息,请参阅许可证文件。