Dpay direct billing

Base:

$dpay = $payment->online(
    new DpayDirectbillingPayment(
        'guid (service id from dpay panel)', 
        'secretKey'
    )
);

Generate payment:

$dpay->setAmount(1.23);
$dpay->setSuccessUrl('https://google.com');
$dpay->setFailUrl('https://google.com');
$dpay->setCustom('customParameter');

$dpayPayment = $dpay->generatePayment();
$dpayPayment->getTransactionId(); //transaction id
$dpayPayment->getTransactionUrl(); //transaction url

Last updated