Home > Backend Development > PHP Tutorial > How to implement synchronous callback

How to implement synchronous callback

WBOY
Release: 2016-07-06 13:51:27
Original
847 people have browsed it

There are two servers, severA, severB, user C

User C accesses serverA, and then POSTs a form to serverB. At this time, the page the user sees is the page provided by serverB. After serverB processes the business, POST submits the processing information to serverA, and the user page returns to serverA.

Question: How does serverB implement this post callback? Does serverB return an html structure to user C, including a form structure? After user C gets the html, he immediately submits the form?

Reply content:

There are two servers, severA, severB, user C

User C accesses serverA, and then POSTs a form to serverB. At this time, the page the user sees is the page provided by serverB. After serverB processes the business, POST submits the processing information to serverA, and the user page returns to serverA.

Question: How does serverB implement this post callback? Does serverB return an html structure to user C, including a form structure? After user C gets the html, he immediately submits the form?

Is it ok for serverB curl to request serverA? ServerB does an internal forwarding to request serverb. Is it ok?

I feel like you have already answered: "serverB returns an html structure to user C, including a form structure. After user C gets the html, he immediately submits the form."

I feel that the application scenario mentioned by the poster is a bit like the Alipay merchant payment scenario. Post data from your own page and then jump to the Alipay payment page
Then after the payment is successful, Alipay will jump to your page based on the return_url you passed.
The poster can simulate the business logic processing process of Alipay

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template