itelmenko/php-payonline-client

Payonline API Client PHP library

1.0.1 2020-01-17 09:29 UTC

This package is auto-updated.

Last update: 2024-04-18 19:21:07 UTC


README

Работа с Payonline для приема платежей через платежную страницу на стороне https://payonline.ru

Пример

$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}");