The website cannot apply for the Alipay interface and WeChat interface, and there are several solutions for implementing interface-free payment collection.

高洛峰
Release: 2017-01-17 10:59:22
Original
2153 people have browsed it

The website cannot apply for the Alipay interface, WeChat interface, and interface-free payment collection implementation.

Since the customer website required payment, but could not apply for the interface, I found a third-party interface, but it stopped working every few days, so I did some research on the payment methods that are currently popular online.

Many informal business websites cannot apply for the instant payment interface of Alipay, nor can they apply for the WeChat payment interface. But we need a payment interface, what should I do?

There are many such interface-free implementation methods on the Internet.

There are mainly two methods:

1. Apply for third-party payment, or directly build a third-party one yourself. 3rd party website. This website is a regular website, such as a normal shopping website that sells regular physical goods such as clothes and shoes. It is easy to apply for the interface for this kind of website.

After applying for the interface, this website can access payment normally.

Next, our informal website can post data to the formal website, add an order on the regular website, pay normally, and after the payment is completed and callback, return the payment result to the informal website to complete the payment.

This method is the safest.

2, another method, is also used more now.

A QR code is provided for payment. The user directly scans the code to complete the transfer. A small program is installed on the customer's computer and can also be downloaded online. It instantly scans the transaction records of Alipay and WeChat backends. If new records are found, POST them to the website. to complete the payment process.

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

The usual approach is to confirm who paid through the remarks column when making payment.

Looked at other people's code and found a better way to implement it.

Firstly, Alipay mobile phone generates 50-100 QR codes for payment, and the amount is set to the amount you need. In the reason for payment, make up a number yourself, and the name of the file saved by the QR code is also this number, and then save the number records of these 50 QR codes to the database.

Each record is given a status field, 0 means payment can be made, 1 means payment is being made, and there is also a UID field.

When you need to pay, first select a record with a status of 0 from the database. After selecting, set the status to 1, and the payment user ID is also updated to the UID field of this record. After selecting, you can After reading this QR code, the

QR code is returned to the user. After the user completes scanning the code, at this time, in the Alipay transaction record, the number of the QR code will be in the remarks column. .

Our EXE program (actually a WEBVIEW control, which refreshes the Alipay transaction record page at any time) will extract the record after it has a new record, and POST it to the website. When the website receives the message, it will use this note number. Select the record

from our database, and you will know the UID. Add a balance to this UID or complete the order payment. After changing the status of this record to 0, the UID is also 0,

The payment is completed. This method is now more commonly used.

Thank you for reading, I hope it can help you, thank you for your support of this site!

More websites cannot apply for Alipay interface, WeChat interface, and there are several solutions for implementing interface-free payment collection. For related articles, please pay attention to the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template