Answer the question
In order to leave comments, you need to log in
How to open a thank you page for a purchase if the store server returned 200?
Colleagues, have a good day.)
Please help.
SUBZH:
I have a product landing from an online store. A request is sent from it to the store's server.
In the form action (action="") there is a specific page where the response is generated, for example, shop.server.com/api_simple_order
If the server is happy with everything, it returns 200
{"status_code":200,"status_text":"7529357"}
If not, then it can send the
following {"status_code":410,"status_text":"Duplicate phone number"}
QUESTION:
Tell me how, when answering 200, open the page with gratitude to the buyer, which is located in the same place as the landing index.
Thanks in advance for a reasonable answer .
Answer the question
In order to leave comments, you need to log in
View Composers solve your problem. Read docs before writing code
https://laravel.ru/docs/v5/views#%D0%BF%D0%B5%D1%8...
or
https://laravel.ru/docs/v5/views#%D0%BF%D0 %BE%D1%8...
You need to send data via AJAX. Parse the received response with JSON and, depending on the response, display the result to the user.
Example:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question