CashBill transfer & paysafecard
Base:
$cashbill = $payment->online(
new CashBillPayment(
'shopId',
'shopKey',
CashBillPayment::ENVIRONMENT_TEST OR CashBillPayment::ENVIRONMENT_PRODUCTION
)
);
Initiate payment:
$cashbill->setTitle('(required) Payment title (eg. company name)');
$cashbill->setAmount(1.23); //required
//Other setters are optional
$cashbill->setDescription('description');
$cashbill->setAdditionalData('yourCustomData');
$cashbill->setReturnUrl('https://google.com');
$cashbill->setNegativeReturnUrl('https://google.com');
$cashbill->setEmail('email@email.pl');
$cashbill->setPaymentChannel('paymentChannel'); //set paysafecard to use paysafecard
$cashbill->setFirstname('firstname');
$cashbill->setSurname('surname');
$cashbill->setCurrency('currency (default: PLN)');
$cashbill->setReferer('refererCode');
$cashbill->setLanguage('languageCode (default: pl)');
$cashbillPayment = $cashbill->generatePayment();
$cashbillPayment->getTransactionId(); //transaction id
$cashbillPayment->getTransactionUrl(); //transaction url
Get transaction info:
$cashbill->getTransactionInfo('transactionId');
/*
Response is an object with data visible in CashBill's documentation
https://www.cashbill.pl/download/dokumentacje/Platnosci/Platnosci_CashBill_2.4.pdf
(point 3.3, page 17)
*/
Set redirect urls:
$cashbill->setReturnUrl('https://google.com');
$cashbill->setNegativeReturnUrl('https://google.com');
$cashbill->setRedirectUrls('transactionId');
Last updated