Dpay transfer

Base:

$dpay = $payment->online(
    new DpayTransferPayment(
        'serviceName', 
        'serviceHash', 
        DpayTransferPayment::ENVIRONMENT_TEST OR DpayTransferPayment::ENVIRONMENT_PRODUCTION
    )
);

Generate payment:

//required
$dpay->setAmount(1.23);
$dpay->setSuccessUrl('https://success.pl');
$dpay->setFailUrl('https://fail.pl');
$dpay->setIpnUrl('https://ipn.pl');
//optional
$dpay->setInstallment(true/false);
$dpay->setCreditCard(true/false);
$dpay->setPaysafecard(true/false);
$dpay->setPaypal(true/false);
$dpay->setNoBanks(true/false);
$dpay->setChannel('channel');
$dpay->setEmail('email');
$dpay->setClientName('firstname');
$dpay->setClientSurname('surname');
$dpay->setCustom('myCustomData');
$dpay->setDescription('description');
$dpay->setStyle('STYLE'); //available styles: 
    DpayTransferPayment::STYLE_DEFAULT,
    DpayTransferPayment::STYLE_GREEN,
    DpayTransferPayment::STYLE_ORANGE,
    DpayTransferPayment::STYLE_DARK
    
    
$dpayPayment = $dpay->generatePayment();
$dpayPayment->getTransactionId(); //transaction id
$dpayPayment->getTransactionUrl(); //transaction url

Get transaction info:

$dpay->getTransactionInfo('transactionId');

Last updated