Dotpay transfer

Base:

$dotpay = $payment->online(
    new DotPayPayment(
        'shopId (as int)',
        'pin',
        DotPayPayment::ENVIRONMENT_SANDBOX or DotPayPayment::ENVIRONMENT_PRODUCTION
    )
);

Generate payment:

//required
$dotpay->setAmount(1.23);
$dotpay->setDescription('my description');
//optional
$dotpay->setCurrency('PLN');
$dotpay->setChannel('channel');
$dotpay->setChLock(0/1);
$dotpay->setIgnoreLastPaymentChannel(0/1);
$dotpay->setChannelGroups('channelGroups');
$dotpay->setRedirectUrl('https://google.com');
$dotpay->setType('type');
$dotpay->setButtonText('myText');
$dotpay->setByLaw(0/1);
$dotpay->setPersonalData(0/1);
$dotpay->setUrlc('https://ipn-url.com');
$dotpay->setExpirationDate('2019-06-01 12:06:37');
$dotpay->setControl('CustomData');
$dotpay->setFirstname('firstname');
$dotpay->setLastname('lastname');
$dotpay->setEmail('email');
$dotpay->setStreet('street');
$dotpay->setStreetN1('streetN1');
$dotpay->setStreetN2('streetN2');
$dotpay->setState('state');
$dotpay->setAddr3('addr3');
$dotpay->setCity('city');
$dotpay->setPostCode('12-222');
$dotpay->setPhone('phone');
$dotpay->setCountry('PL');
$dotpay->setLang('pl');
$dotpay->setCustomer('customer');
$dotpay->setDeliveryAddress('deliveryAddress');
$dotpay->setPInfo('pInfo');
$dotpay->setPEmail('pEmail');
$dotpay->setBlikCode('blikCode');
$dotpay->setGpToken('gpToken');
$dotpay->setApToken('apToken');

$dotpayPayment = $dotpay->generatePayment();
$dotpayPayment->getTransactionUrl(); //transaction url

Generate urlc signature:

$dotpay->generateUrlcSignature($_POST);

Last updated