How can I confirm which user has completed the payment for WeChat payment?

Source: Internet
Author: User
Tags openid
Scan the QR code to get the QR code link and the prepaid information. However, after the payment is complete, the value not corresponding to the previous value submitted to yy_url is used to identify the user who paid the order (the openid was not obtained at the beginning, but only submitted... scan the QR code to get the QR code link and the prepaid information. However, after the payment is complete, the value not corresponding to the previous value submitted to yy_url is used to identify the user who paid the order (the openid was not obtained at the beginning, but the product information was submitted and the QR code was obtained ). The current idea is to add user-related information in notify_url. I don't know if this is the correct method.
In addition, it is difficult to achieve automatic jump in front-end payment.

How did you do it? I feel that the document is unclear.

Reply content:

Scan the QR code to get the QR code link and the prepaid information. However, after the payment is complete, the value not corresponding to the previous value submitted to yy_url is used to identify the user who paid the order (the openid was not obtained at the beginning, but the product information was submitted and the QR code was obtained ). The current idea is to add user-related information in notify_url. I don't know if this is the correct method.
In addition, it is difficult to achieve automatic jump in front-end payment.

How did you do it? I feel that the document is unclear.

The order information for each successful payment will be sent to yy_url. For details, refer:

{    "appid":"wx345f3830c28971f4",    "bank_type":"CFT",    "cash_fee":"1",    "fee_type":"CNY",    "is_subscribe":"Y",    "mch_id":"1241642202",    "nonce_str":"fTbkMTXgMmnvTaO1",    "openid":"oWY-5jjLjo7pYUK86JPpwvcnF2Js",    "out_trade_no":"124164220220150803161536",    "result_code":"SUCCESS",    "return_code":"SUCCESS",    "sign":"4B8948BD3E831394C956B5DFA8AAEB1E",    "time_end":"20150803161547",    "total_fee":"1",    "trade_type":"JSAPI",    "transaction_id":"1005130236201508030539058581"}

Out_trade_no is your order ID. You only need to update the order status in your application.

Reference: https://github.com/thenbsp/wechat/blob/master/example/payment-notify.php

Find a solution.
The original merchant system generates an out_trade_no, which will be passed back when the payment is completed and the Merchant system is notified. Therefore, the payer can be determined by using this unique id. In addition, an attach field is provided to pass custom information and return it when the payment is completed.

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.