Pay attention to WeChat official account scan code payment

WeChat official account payment:
       payment process: first, you need to adjust the unified api to get the prepayid--" and then to the front-end--" call the WeChat api to pop up the payment input password form--" the user enters the password to complete the payment--" There is a callback function on the page to indicate success or failure (but it should still be confirmed by WeChat calling your callback url to confirm the payment success or failure )

. page. For example, my page url is http://domian/test/pay/ , then paste this on the WeChat background. And it has to be precise, you can't write one level directory like http://domian/test/. Because there are two entrances on my side, one is to pay for direct booking, and the other is to pay on the order details page in my booking, so the two urls are different. I wanted to directly set the previous directory as the payment authorization directory. Result failed. In fact, our process needs to be changed. After direct booking, we should jump to the page of order details and then click on payment, so that the payment page will unify the window.location.href of ios. No jumping problem       , we need an openid to enterCome, because the payment api in the back needs it. Then I just adjusted the api of WeChat to get the openid, and then automatically jumped to our homepage. It turned out that ios can't (but you can add a button and click it manually, fuck it), android can.      Solution: directly put the url of calling WeChat openid into the button of the official account





Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327063467&siteId=291194637