Answer the question
In order to leave comments, you need to log in
Payment APIs, how and where to store payment information between redirects?
Hello
In many payment apis, the scheme of work is as follows:
1. create a payment object (it contains information about the payment - id, amount, payment type, what the payment is for, etc.)
2. send the user to confirm the payment on the page of the payment system
3. payment the system returns the user to the return url specified in the store settings, where the result should be processed.
BUT! in the third paragraph, they do not send back information about the payment. They just bring the user back to the site.
How to process the payment result on this page, if it is not known from which payment the user returned by redirect?!
It turns out that in the first paragraph it is necessary to somehow temporarily save the payment object and associate the user with it, store this information somewhere in the interval while the user goes to confirm the payment ... How is this done? help me figure it out please
Answer the question
In order to leave comments, you need to log in
The payment system sends a response to the handler as a separate request. User redirect at your discretion. It can be on the list of accounts or on the account page. Depends on the payment system. As you say, so be it.
1. create a payment object (it contains information about the payment - id, amount, payment type, what the payment is for, etc.)
2. you send the user to confirm the payment to the page of the payment system
3. the payment system returns the user to the return url specified in the store settings, where the result must be processed.
Proconsool , When making a request to YuKassa, you can transfer any metadata in the payment object (all the id you need). This metadata will be present in all service responses.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question