icadpay/checkout
Composer 安装命令:
composer require icadpay/checkout
包简介
Checkout API for third-party applications
README 文档
README
Instantiate Service class
$config = new IcadpayConfig();
$config->merchantId = "test_pub_key";
$config->merchantKey = "test_priv_key";
$config->publicModulus = " ";
$config->publicExponent = " ";
$initService = new CardService($config);
Send payment request
$cardItem = new CardDto();
$cardItem->pan = "5060990580000217499";
$cardItem->expiryDate = "5003";
$cardItem->cvv = "111";
$cardItem->pin = "1111";
$paymentItem = new PaymentDto();
$paymentItem->amount = 100;
$paymentItem->currency = "NGN";
$paymentItem->customerId = "jjj@us.cc";
$paymentItem->transactionRef = "iiwiwwmw3994";
$paymentItem->card = $cardItem;
$payReq = $initService->ProcessCard($paymentItem);
$payRes = json_decode($payReq);
//echo $payReq;
Authorize transaction
$authTr = new AuthorizeTransDto();
$authTr->amount = 100;
$authTr->paymentId = $payReq->paymentId;
$authTr->otp = "123456";
$authReq $initService->AuthorizeTransaction($authTr);
Resend OTP
$otpReq = new RequestOtpDto();
$otpReq->amount = 100;
$otpReq->currency = "NGN";
$otpReq->paymentId = "232333";
$resendOtp = $initService->ResendOtp();
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: mit
- 更新时间: 2023-06-13