定制 alsharie/cashpay-payment 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

alsharie/cashpay-payment

最新稳定版本:1.2.1

Composer 安装命令:

composer require alsharie/cashpay-payment

包简介

CashPay payment gateway

README 文档

README

img.png

laravel package for CashPay payment getway install the package composer require alsharie/cashpay-payment

You can publish using the following command

php artisan vendor:publish --provider="Alsharie\CashPayPayment\CashPayServiceProvider"

When published, the config/cashPay.php config file contains:

return [
    'auth' => [
        'UserName' => env('CASHPAY_MERCHANT_USERNAME'),
        'SpId' => env('CASHPAY_MERCHANT_SPID'),
        'encPassword' => env('CASHPAY_MERCHANT_ENCPASSWORD'),
    ],
    'cert' => [
        'path' => env('CASHPAY_CERT_PATH'),
        'password' => env('CASHPAY_CERT_PASSWORD'),
    ],
    'url' => [
        'base' => env('CASHPAY_BASE_URL', 'https://www.tamkeen.com.ye:33291/CashPG'),
    ]
];

when you are ready to release your application, you should set the CASHPAY_BASE_URL to release-url and they give you a certificate file and password to use it in CASHPAY_CERT_PATH and CASHPAY_CERT_PASSWORD respectively

To purchase using CashPay payment

1. Purchase

 $cashPay = new CashPay();
 $response = $cashPay
    ->setRequestId(/*request id*/) //Request unique identifier that should be generated by sp
    ->setCustomerPhone(/*phone */) // TargetMSISDN
    ->setCustomerCashPayCode(/*code*/)
    ->setAmount(/*amount*/)
    ->setCurrency(2)
    ->setDescription(/*desc*/) 
    ->initPayment();

 if ($response->isSuccess()) {
    $tran_ref = $response->getTransactionRef();
    ....
    ....
 } 
        

2. Confirm purchase

 $cashPay = new CashPay();
$response = $cashPay
    ->setRequestId(/*request id*/) //Request unique identifier that should be generated by sp
    ->setOtp(/*otp */) // customer otp
    ->setTransactionRef(/*tran ref*/) //Transaction Code returned in InitPayment response
    ->confirmPayment();
    
 if ($response->isSuccess()) {
    $code = $response->code();
    ....
    ....
 } 
        

you can get the full response body using $response->body() for all requests

统计信息

  • 总下载量: 134
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 12
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 12
  • Watchers: 1
  • Forks: 9
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-10-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固