WeChat payment scanning Code Payment development: I encountered the pit and solutions (attached: Ecshop WeChat payment plugin), ecshop_php tutorial

Source: Internet
Author: User

Payment of the Scan code payment development: I encountered the pit and solution (attached: Ecshop payment plugin), Ecshop

Some time ago to help a friend based on the Ecshop development of the Mall to join the scan payment function, this thought is very simple thing--Download the official SDK or development help document, according to the inside of do OK, behold toss two or three days of time to calculate, in the middle also with questions on the internet to find a lot of technical articles, But found all just a relatively sketchy write how they develop access, and did not solve the problems I encountered ..., alas, sometimes the real feeling ' only on their own '. This article is to want to put their own problems and solutions to write, so that the development of this area of the friend has helped!

Before development, review the official "Scan code Payment" Development document, scan code payment is divided into the following two modes:

mode one:

  Problems encountered: The first scan of the QR code can also be normal scan, unpaid re-scan will prompt: OK or request merchant Information Timeout Httpcode non---This problem try to find a solution through a variety of ways have no effect, here want to know friends can give and answer, thank you!

mode two:

Note:   can not directly use the mall's order number as a trade order number (OUT_TRADE_NO), or else to generate a scan code to pay the QR code, the interface will prompt: The merchant order number is duplicated , cannot be regenerated.

So Jiangzi question, how to set the trade order number, but also to ensure that the subsequent interface to query the merchant platform for the corresponding order information or to achieve reconciliation? The feasible way is: before sweeping the unified next single interface, out_trade_no do not pass the order number of the mall order system, but regenerate a new unique water, and then add an order number and payment transaction order number (OUT_TRADE_NO) corresponding table, as follows:

There is a Serial_is_paid field in the table above: used to mark whether this transaction has been completed, that is: in the payment success notification callback processing, according to the return of the Out_trade_no update payment status, as to how to check the status of the order payment, presumably you should also know ...

Well, a long time did not write technical blog some can not find the feeling, writing may be relatively sketchy, have not clear friends to pay attention to & exchange!

Reference website >>

Ecshop Payment plugin. rar

My subscription number:Zxcknowmore, your concern and support is my motivation to write more blog posts!

http://www.bkjia.com/PHPjc/1048740.html www.bkjia.com true http://www.bkjia.com/PHPjc/1048740.html techarticle payment of the scan code payment development: I encountered the pit and solution (attached: Ecshop payment plugin), Ecshop time ago to help a friend based on the Ecshop development of the Mall to join the scan ...

  • Related Article

    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.