itelmenko/php-payonline-client

Payonline API 客户端 PHP 库

1.0.1 2020-01-17 09:29 UTC

This package is auto-updated.

Last update: 2024-09-18 20:23:47 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}");