Przelewy24 transfer

Base:

$p24 = $payment->online(
    new Przelewy24Payment(
        'merchantId as int', 
        'posId as int', 
        'crc', 
        'raportKey', 
        Przelewy24Payment::ENVIRONMENT_SANDBOX or Przelewy24Payment::ENVIRONMENT_PRODUCTION
    )
);

Generate payment:

//required
$p24->setSessionId('sessionId');
$p24->setAmount(1.23);
$p24->setDescription('description');
$p24->setEmail('email@domain.tld');
//optional
$p24->setCurrency('PLN');
$p24->setClient('client');
$p24->setAddress('address');
$p24->setZip('zip');
$p24->setCity('city');
$p24->setCountry('PL');
$p24->setPhone('phone');
$p24->setLanguage('pl');
$p24->setMethod('method');
$p24->setUrlReturn('https://return-url.pl');
$p24->setUrlStatus('https://ipn-url.pl');
$p24->setTimeLimit('timeLimit (int)');
$p24->setChannel('channel (int)');
$p24->setWaitForResult(true/false);
$p24->setRegulationAccept(true/false);
$p24->setShipping('shipping (int)');
$p24->setTransferLabel('transferLabel');
$p24->setMethodRefId('methodRefId');
$p24->setAdditional('additional');

$p24Payment = $p24->generatePayment();
$p24Payment->getTransactionUrl();
$p24Payment->getTransactionId();

Verify transaction:

$p24->setSessionId('sessionId');
$p24->setAmount(1.23);
$p24->setCurrency('PLN');
$p24->verifyTransaction('orderId as int');

Last updated