gdpa / eways-client
Eways.ir APIs 客户端
v7.4
2020-12-13 17:00 UTC
Requires (Dev)
- mockery/mockery: ^1.2
- phpunit/phpunit: ^9.3
README
此库简化了使用 GetProducts、RequestPins 和 GetStatus SOAP 的 eways APIs。
安装
您可以通过 composer 安装此包
composer require gdpa/eways-client
使用方法
// Order a pin or top up in one shot $ewaysClient = new EwaysClient('username', 'password'); $ewaysClient->orderPin($transactionId, $productId, $mobile, $quantity, $email, $optional, $refUrl); // Pay a bill $ewaysClient = new EwaysClient('username', 'password'); $ewaysClient->payBill($transactionId, $billId, $payId, $optional); // Check order status in one shot $ewaysClient = new EwaysClient('username', 'password'); $ewaysClient->getStatus('transactionID', 'requestID'); // Get products $getProducts = new GetProduct('username'); $getProducts->products(); // Find product by CID // For example MTN Top Up CID 40 $getProducts = new GetProduct('username'); $product = $getProducts->find(40); // Call RequestPin $requestPin = new RequestPin($password); $requestPin->requestId($requestId)->quantity($quantity)->productType($productId)->mobile($mobile)->email($email) ->optional($optional)->refUrl($refUrl)->result(); // Get order status $getStatus = new GetStatus(); $result = $getStatus->transactionId($transactionId)->requestId($requestId)->result();
测试
composer test
变更日志
请参阅 变更日志 了解最近的变化。
贡献
请参阅 贡献指南 获取详细信息。
安全性
如果您发现任何与安全性相关的问题,请发送电子邮件至 morteza.poussaneh@gmail.com 而不是使用问题跟踪器。
致谢
许可证
MIT 许可证 (MIT)。请参阅 许可证文件 了解更多信息。
PHP 包模板
此包使用 PHP 包模板 生成。