przelewy24-php
przelewy24-php copied to clipboard
Question regarding urlCardPaymentNotification
The docs: https://developers.przelewy24.pl/index.php?en#tag/Card-Notification specify: Notification is sent to the url given in the "urlCardPaymentNotification" parameter, which must be added to the transaction/register method, or to a fixed address saved in the P24 account configuration. The value from the token, if it was sent, is paramount.
How did you know the urlCardPaymentNotification should be put as an additional parameter in transaction/register function?
public function register(
string $sessionId,
int $amount,
string $description,
string $email,
string $urlReturn,
Encoding $encoding = Encoding::UTF_8,
Language $language = Language::POLISH,
Currency $currency = Currency::PLN,
Country $country = Country::POLAND,
?int $method = null,
?string $client = null,
?string $address = null,
?string $zip = null,
?string $city = null,
?string $phone = null,
?string $urlStatus = null,
?int $timeLimit = null,
?int $channel = null,
?bool $waitForResult = null,
?bool $regulationAccept = null,
?int $shipping = null,
?string $transferLabel = null,
?int $mobileLib = null,
?string $sdkVersion = null,
?string $methodRefId = null,
?array $cart = null,
?Shipping $shippingData = null,
?string $urlCardPaymentNotification = null,
): RegisterTransactionResponse {
$sign = Przelewy24::createSignature([
'sessionId' => $sessionId,
'merchantId' => $this->config->merchantId(),
'amount' => $amount,
'currency' => $currency->value,
'crc' => $this->config->crc(),
]);
$json = [
'merchantId' => $this->config->merchantId(),
'posId' => $this->config->posId(),
'sessionId' => $sessionId,
'amount' => $amount,
'currency' => $currency->value,
'description' => $description,
'email' => $email,
'client' => $client,
'address' => $address,
'zip' => $zip,
'city' => $city,
'country' => $country->value,
'phone' => $phone,
'language' => $language->value,
'method' => $method,
'urlReturn' => $urlReturn,
'urlStatus' => $urlStatus,
'timeLimit' => $timeLimit,
'channel' => $channel,
'waitForResult' => $waitForResult,
'regulationAccept' => $regulationAccept,
'shipping' => $shipping,
'transferLabel' => $transferLabel,
'mobileLib' => $mobileLib,
'sdkVersion' => $sdkVersion,
'sign' => $sign,
'encoding' => $encoding->value,
'methodRefId' => $methodRefId,
'urlCardPaymentNotification' => $urlCardPaymentNotification,
];