alsharie/alqutaibibank-payment
最新稳定版本:1.0
Composer 安装命令:
composer require alsharie/alqutaibibank-payment
包简介
AlQutaibiBank payment gateway
README 文档
README
laravel package for AlQutaibiBank payment getway
install the package
composer require alsharie/alqutaibibank-payment
You can publish using the following command
php artisan vendor:publish --provider="Alsharie\AlQutaibiBankPayment\AlQutaibiBankServiceProvider"
When published, the config/AlQutaibiBank.php config file contains:
return [ 'app_key' => env('AlQutaibiBank_APP_KEY'), 'api_key' => env('AlQutaibiBank_API_KEY'), 'payment_destnation' => env('AlQutaibiBank_PAYMENT_DESTNATION'), 'url' => [ 'base' => env('AlQutaibiBank_BASE_URL', 'https://newdc.qtb-bank.com:5052/PayBills'), ] ];
To purchase using AlQutaibiBank payment
1. RequestPayment
$alqutaibi = new AlQutaibiBank(); $response = $alqutaibi ->setPaymentCustomerNo($user_phone) // TargetMSISDN ->setPaymentCode($payment_code) ->setPaymentAmount($total_payment) ->setPaymentCurr(1) //1 = YER ->RequestPayment(); if ($response->isSuccess()) { $response->getTransactionID()(); ... ... }
2. Confirm Payment
$alqutaibi = new AlQutaibiBank(); $response = $alqutaibi ->setPaymentCustomerNo($user_phone) ->setPaymentCode($payment_code) ->setPaymentAmount($total_payment) ->setPaymentCurr(1) ->setPaymentOTP($otp) // customer otp ->confirmPayment(); if ($response->isSuccess()) { return $response->getTransactionId(); }
you can get the request using $response->getRequest()
you can get the full response body using $response->body() for all requests
统计信息
- 总下载量: 35
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-02-26
