Familiar with third-party payment and third-party payment
Third-party payment
First, register a merchant account on the third-party payment platform. The payment platform will assign you a merchant id, which is very important and requires a merchant key between the merchant id and the third-party payment platform, it is used for verification in case of transactions and for payment. When a payment occurs, the website (or App) payment page is redirected to a third-party payment platform. The jump involves a series of parameters, including a callback address after processing the payment, after logging on to the third-party payment platform and completing the payment, go back to the original website and jump to the callback address that was previously transferred to the payment platform. When you jump to the callback page, check whether the payment is successful. If the payment is successful, execute corresponding operations. Otherwise, execute other operations.
Download the simulator here. The simulator uses ASP. NET (I don't know who wrote it. For the first time, I saw it as a Chuanzhi podcast, probably written by Yang zhongke). After the download, configure IIS or use the CassiniDev small IIS server to run this folder as a website. In my example, this folder is configured on IIS and can be downloaded from CassiniDev, after the website is configured, the simulated environment is basically set up. In addition, to clearly view the page Jump during payment, configure the host to point to alipay.com When configuring IIS, and then the address of the website homepage is alipay.com: 8088, if you want to change the host point, this configuration is not enough. You also need to modify the hosts file and add alipay to 127.0.0.1. The hosts file is located inC: \ windows \ system32 \ drivers \ etc \Directory
The homepage of the simulator is shown in figure
Source code download