receiver1/omnipay-pzmpay
最新稳定版本:v1.0.0
Composer 安装命令:
composer require receiver1/omnipay-pzmpay
包简介
PZMPay gateway for Omnipay
README 文档
README
PZMPay online acquiring support for Omnipay
Already Implemented
- Payment creation
- Payment information
- Incoming notifications
To Be Implemented
- Payment cancellation
- Project balance
- Fiscalization under Federal Law 54
- Testing mode
- Error codes
Installation
composer require league/omnipay receiver1/omnipay-pzmpay
Usage
Gateway Initialization
// Create a new payment gateway $gateway = Omnipay::create('PZMPay'); // Set the secret code $gateway->setSecretCode('secretCode');
Payment Creation
// Create a new payment for 10 rubles 00 kopecks $purchaseResponse = $gateway->purchase([ 'amount' => 10, 'currency' => 'RUB', 'description' => 'Balance top-up 1337 Cheats', ])->send(); if (!$purchaseResponse->isSuccessful()) { throw new Exception($response->getMessage()); } // Get the payment identifier in PZMPay $invoiceId = $purchaseResponse->getTransactionId(); // Get the link to the PZMPay payment form $redirectUrl = $purchaseResponse->getRedirectUrl();
Payment Verification
$notification = $gateway->acceptNotification($data); if ($notification->getTransactionStatus() === NotificationInterface::STATUS_COMPLETED) { /** @var TransactionModel $incomingTransaction */ $incomingTransaction = $notification->getTransactionReference(); $transactionResponse = $gateway->fetchTransaction([ 'transactionId' => $incomingTransaction->getId(), ])->send(); /** @var TransactionModel $trustedTransaction */ $trustedTransaction = $transactionResponse->getTransactionReference(); print ($trustedTransaction->getAmount()); }
统计信息
- 总下载量: 178
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-10-03