mnastalski / przelewy24-php Goto Github PK
View Code? Open in Web Editor NEWPHP library for Przelewy24 API
License: MIT License
PHP library for Przelewy24 API
License: MIT License
Hello,
Thanks for native PHP module but It seems there is an error during transaction verification waiting for Przelewy24 incoming request.
In transaction "url_status" i set url with php code:
$webhook = $przelewy24->handleWebhook(); <-- but this doesnt return any parameters or objects
$przelewy24->verify([
'session_id' => '12343', // my test order_id
'order_id' => $webhook->orderId(), // <-- for some reason $webhook is null :/
'amount' => 'transaction amount as an integer (1.25 PLN = 125)',
]);
Method "$przelewy24->verify" throw error cause $webhook is null.
Hej,
Biblioteka na niektórych serwerach przekazuje pole p24_api_version jako float 3,2 (z przecinkiem) i przelewy24 zwracają p24_api_version:Incorrect api version.
Sugeruje numer wersji API trzymać jako string '3.2' - to rozwiąże problem.
I have an error while payment
ErrorException Undefined array key "p24_order_id"
Illuminate\Foundation\Bootstrap\HandleExceptions::handleError
...\vendor\mnastalski\przelewy24-php\src\TransactionStatusNotification.php:49
/**
* @return int
*/
public function orderId(): int
{
return $this->parameters['p24_order_id']; // <-- error
}
my code is like in your example:
$przelewy24 = new Przelewy24([
'merchant_id' => $merchantId,
'crc' => $crc,
'live' => false,
]);
$transaction = $przelewy24->transaction([
'session_id' => $sessionId,
'url_return' => $urlReturn,
'url_status' => '',
'amount' => $amount,
'description' => $description,
'email' => $customer_email,
]);
$transaction->token();
$transaction->redirectUrl();
$webhook = $przelewy24->handleWebhook();
$przelewy24->verify([
'session_id' => $sessionId,
'order_id' => $webhook->orderId(),
'amount' => $amount,
]);
And by the way: is it possible to choose a currency in your code?
Kod w obecnej wersji pracuje na starym API więc nie ma możliwości integracji (zawłaszcza obsługi notyfikacji a co za tym idzie weryfikacji ) bazując na tej wersji API
Cześć, czy planowana jest aktualizacja biblioteki do najnowszej wersji API?
Między innymi obsługa zwrotów...
Hi,
While creating transaction with Yours composer library I am in need to pass argument 'waitForResult' => true.
However because it doesnt work as described on przelewy24 docs I started to wonder if from transaction data that I am passing inside I am using proper parameters.
In docs there is sessionId and here I am passing session_id. Maybe the same should be with "waitForResult" parameter?
$transaction = $payment->transaction([
'session_id' => $order_name,
'url_return' => ''
'url_status' => '',
'waitForResult' => true,
'amount' => '',
'description' => '',
'email' => '',
]);
Regards
Łukasz
As per documentation for card payment, the POST /api/v1/transaction/register supports the urlCardPaymentNotification
parameter in certain cases (see https://developers.przelewy24.pl/index.php?pl#tag/Card-Notification)
The library does not support card payment related endpoints
Witam. Jak sprawdzić czy weryfikacja transakcji przebiegła pomyślnie? Gdyby ApiResponse::hasError była metodą publiczną możnaby jej użyć do weryfikacji:
$verified = $p24->verify([
'session_id' => $order->getSessionId(), //unique order identifier from your application
'order_id' => $webhook->orderId(), // przelewy24 order id
'amount' => round($order->getTotalSum() * 100), //transaction amount as an integer (1.25 PLN = 125)
]);
if (!$verified->hasError()) {
//$order->setAsPaid(); etc...
}
... ale metoda hasError jest chroniona. Może jest jakiś inny sposób?
przelewy24-php/src/TransactionStatusNotification.php
Lines 60 to 74 in 7366c1b
The API does not support transaction refund yet
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.