The Web site does not apply to Alipay interface, micro-letter interface, the implementation of the interface-free collection of several solutions _javascript

Source: Internet
Author: User

The Web site does not apply to Alipay interface, micro-letter interface, access-free access to the implementation of the way.

Because the customer site needs to pay, but also apply for the interface, find a 3rd party interface, every few days, so the study of the current online payment methods.

Many informal business websites do not apply to Alipay's instant billing interface, and the micro-mail collection interface is not applied. But you must also need the payment interface, how to do.

Now there are a lot of such interface-free implementations online,

There are 2 main ways:

1, apply for 3rd party payment, or directly build a 3rd party website. This site is a regular website, such as normal shopping websites, selling clothes, shoes, these formal physical products

This kind of website is easy to apply to the interface.

After applying for the interface, this website normally accesses the payment.

Next our informal web site, you can post data to the regular web site, in the formal site to add an order, normal payment, payment completed callback after the return to the informal web site payment, completed payment.

This is the safest way.

2, another way, now also use more.

Payment provides a two-dimensional code, the user directly scan the code to complete the transfer, the client computer installed a small program, there are downloads online, instant scan Alipay, micro-letter backstage transactions, found a new record on the post to the website to complete the payment process.

This inside, involves a payment confirmation process and must know who is paying.

The usual practice is to confirm who pays by the notes bar at the time of payment.

Look at someone else's code and find a better way to implement it.

First of all, the mobile phone Alipay generated 50-100, the collection of two-dimensional code, the amount set for the amount you need, in the collection of reasons, their own number, two-dimensional code to save the file name also for this number, and then the 50 two-dimensional code of the number record to save to the database.

Each record is given a status field, 0 to pay, 1 to be paid, and a UID field.

Need to pay, first from the database to select a status of 0 records, select, the status set to 1, the payment user ID also updated to the record of the UID field, select, you can read this two-dimensional code,

The two-dimensional code returns to the user, after the user sweeps the code completes, this time, in Alipay's transaction record, the remark this column has this two-dimensional code the number.

Our EXE program (is actually a webview control, at any time to refresh the Alipay transaction page) There is a new record, on the extraction of records, post to the site, the site received a message, use this memo number from our database to select

We have just the record, we know, UID, to the UID add balance or complete the order payment, in the status of this record to 0,uid also 0,

This completes the payment. The use of this method is also more common now.

Thank you for reading, I hope to help you, thank you for your support for this site!

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.