BLIK Level 0
At first you need to generate transaction:
// only required fields are shown
$payment = SimPay::payment()->generate()
->amount(15.00)
->customer(
new \SimPay\Laravel\Dto\Payment\CustomerData(
email: 'Email',
ip: 'IP address',
countryCode: 'PL', // for BLIK it must be PL
)
)
->antifraud(
new \SimPay\Laravel\Dto\Payment\AntiFraudData(
userAgent: 'UserAgent (REQUIRED)',
)
)
->currency('PLN')
->directChannel('blik-level0') // it must be set to blik-level0
->make();Now make Level 0 call:
ticketType() accepts an BlikLevel0TicketType enum.
If ticket has been accepted, $success will be true.
WARNING: This does not mean that transaction is finished, you still need to listen to our IPN messages.
If ticket code is not valid, two exceptions may be thrown:
\SimPay\Laravel\Exceptions\BlikLevel0\InvalidBlikTicketException
\SimPay\Laravel\Exceptions\SimPayException
Last updated