composer require league/omnipay receiver1/omnipay-pzmpay
// Создаём новый платёжный шлюз $gateway = Omnipay : : create ( 'PZMPay' ) ; // Устанавливаем секретный код $gateway - > setSecretCode ( 'secretCode' ) ;
// Создаём новый платёж на сумму 10 руб. 00 коп. $purchaseResponse = $gateway - > purchase ( [ 'amount' = > 10 , 'currency' = > 'RUB' , 'description' = > 'Пополнение баланса 1337 Cheats' , ] ) - > send ( ) ; if ( ! $purchaseResponse - > isSuccessful ( ) ) { throw new Exception ( $response - > getMessage ( ) ) ; } // Получаем идентификатор платежа в PZMPay $invoiceId = $purchaseResponse - > getTransactionId ( ) ; // Получаем ссылку на форму оплаты PZMPay $redirectUrl = $purchaseResponse - > getRedirectUrl ( ) ;
$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 ( ) ) ; }
Продавец: ник или ID
Название сделки:
Сумма USDT:
Срок сделки, дней:
Кто платит комиссию:
Условия сделки:
После создания сделки средства будут зарезервированы в холде до завершения сделки.