V
V
Vasyl Fomin2018-08-06 16:17:28
Payment systems
Vasyl Fomin, 2018-08-06 16:17:28

How to process the response from the payment system in Omnipay?

I am making a store on Laravel, to work with payment systems I use the Omnipay v3 library + the necessary gateways (Gateways) and wrapper for Laravel barryvdh/laravel-omnipay . Now I'm trying to do it for Inter Kassa.
I did the process of placing an order on my website, going to the page of the Inter Kassa payment system, paying in the payment system itself, redirecting back to the store to the specified pages if the payment is successful or not successful (returnUrl/cancelUrl in omnipay).
Also, in the settings of the checkout itself, Inter Kassa specified the URL ("interaction URL") for sending data on the payment made to my website - (notifyUrl in Omnipay).
I can't figure out how to process the response from the payment system that the payment system sends to my notifyUrl and get the payment status using the Omnipay library and its drivers. I can get the response parameters from the payment, for example, in the $_GET array, (in Laravel $request->all()), but it turns out that different payment systems will have different arrays, different parameters.
In general, can this response be somehow processed using the Omnipay driver and get a unified payment status, for example, something like this: There is something in the documentation in the examples, but it’s either not right, or I’m not using https: / /github.com/thephppleague/omnipay#tldr . Here, as I understand it, processing the response from the payment order, immediately after sending the payment data .. if ($response->isSuccessful()) {//...}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question