Requirement: The user enters the service number-"Click the button below-" Buy a-"jump to the Payment page-" Click the Payment button-"
Call Payment-"prompt success after completion and display number
Already has a service number, completed the certification
Looked at the official documents, said not detailed, it feels very difficult,
Ask the seniors to recommend the relevant tutorials, the easier the better
Thank you so much
Reply content:
Requirement: The user enters the service number-"Click the button below-" Buy a-"jump to the Payment page-" Click the Payment button-" Call payment -" after the completion of the prompt success and display the ticket number
Already has a service number, completed the certification
Looked at the official documents, said not detailed, it feels very difficult,
Ask the seniors to recommend the relevant tutorials, the easier the better
Thank you so much
Payment using JSSDK to complete the payment call, in addition to the service number to complete the payment related configuration, in addition to pay success notice in two ways: synchronous notification (not guaranteed 100% is correct) and asynchronous notification (to ensure that the payment status is completely correct), The asynchronous notification URL is the one that passes the URL to the server before calling the interface.
The technical process is roughly as follows: the backend Language SDK initializes the calling API, assigns a value to the template, then calls JSSDK to initiate the payment, completes the payment, synchronizes the JSSDK call notification method completion prompt, and the asynchronous interface notifies to ensure that the order status and payment are fully synchronized
Then use this https://github.com/overtrue/wechat.
1, set the button to the view type, that is, open a page.
2. Use authorization to obtain user information in the page (JSAPI payment requires OpenID)
3. Generate the Payment JS profile and bind to the Payment button on the page.
Reference: Https://github.com/thenbsp/wechat
Payment Example: https://github.com/thenbsp/wechat/blob/master/example/payment-brandwcpayrequest.php