1. Go to this page and download the library: Download escolalms/przelewy24-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
escolalms / przelewy24-php example snippets
use Przelewy24\Przelewy24;
$przelewy24 = new Przelewy24(
merchantId: 12345,
reportsKey: 'f0ae...',
crc: 'aef0...',
isLive: false,
);
$transaction = $przelewy24->transactions()->register(
// Required parameters:
sessionId: 'unique order identifier from your application',
amount: 125,
description: 'transaction description',
email: 'buyer email address',
urlReturn: 'url to return to after transaction',
// Optional parameters:
urlStatus: 'url to which the transaction status webhook will be sent',
// client: 'Mateusz Nastalski',
// currency: \Przelewy24\Enums\Currency::EUR,
// language: Language::ENGLISH,
// ...
);