PHP code example of itelmenko / php-payonline-client
1. Go to this page and download the library: Download itelmenko/php-payonline-client 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/ */
itelmenko / php-payonline-client example snippets
$page = new PaymentPage($settings['merchant_id'], $settings['private_key']);
$page->setPaymentMethod(new PaymentMethod(PaymentMethod::PAYMENT_METHOD_CARD));
$page->setPrice(new Amount(10.95), new Currency(Currency::CURRENCY_USD));
$page->setOrderId(232424);
$page->setFailUrl('https://custom-domain.ru/payment/fail');
$page->setReturnUrl('https://custom-domain.ru/payment/return');
$page->setLanguage(new Language(Language::LANG_RUSSIAN));
$url = $page->getPaymentUrl();
header("Location: {$url}");