PHP code example of webpayby / wsb_api
1. Go to this page and download the library: Download webpayby/wsb_api library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
webpayby / wsb_api example snippets
$response = (new RefundRequest(self::HOST, self::LOGIN, self::PASSWORD, self::BILLING_ID))
->setAmount('6.00')
->setCurrency(Currency::BYN)
->setTransactionId('956424424')
->setReason('by client request')
->send();
$response = (new CancelRequest(self::HOST, self::LOGIN, self::PASSWORD, self::BILLING_ID))
->setAmount('6.00')
->setCurrency(Currency::BYN)
->setTransactionId('956424424')
->setReason('by client request')
->send();
$response = (new CompleteRequest(self::HOST, self::LOGIN, self::PASSWORD, self::BILLING_ID))
->setAmount('5.00')
->setCurrency(Currency::BYN)
->setTransactionId('956424424')
->send();
$response = (new CompleteWithSouRequest(self::HOST, self::LOGIN, self::PASSWORD, self::BILLING_ID))
->setAmount('5.00')
->setCurrency(Currency::BYN)
->setTransactionId('956424424')
->setServiceNumber('391871')
->setServiceAccount('11111111111111')
->send();
$response = (new GetTransactionStatusRequest(self::HOST, self::LOGIN, self::PASSWORD, self::BILLING_ID))
->setStartYear('2019')
->setStartMonth('01')
->send();