WeChat development-Want to jump to PHP page in WeChat service number to complete payment how to do?

Source: Internet
Author: User
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

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.