Table of Contents
Based on OpenCart to develop Alipay, Tenpay, and WeChat payment parameter errors, opencart Pay
Home Backend Development PHP Tutorial Developing Alipay, Tenpay, and WeChat payment parameter errors based on OpenCart, opencart Pay_PHP tutorial

Developing Alipay, Tenpay, and WeChat payment parameter errors based on OpenCart, opencart Pay_PHP tutorial

Jul 12, 2016 am 09:07 AM
opencart Alipay

Based on OpenCart to develop Alipay, Tenpay, and WeChat payment parameter errors, opencart Pay

Recently integrating Alipay, Tenpay and WeChat scan code payment for OpenCart, in fact These plug-ins are available for sale, but they are quite expensive. It is better to develop and integrate them yourself to save money. However, some pitfalls were discovered during the integration process, including pitfalls with opencart and pitfalls with payment of SDK, which wasted a lot of time. Here are a few pitfalls for those who need them.

1. The notify_url address in WeChat native mode 2 must be a public address

2. Alipay’s notify_url cannot be in the form of query string, such as xxx/notify.php? route=a/b, can only be xxx/notify.php

3. In the synchronous callback processing in Alipay and Tenpay in OpenCart, it is best to unset ($_GET['route']) before doing payment callback verification, otherwise the callback verification will not be successful because this redundant parameter is involved in the verification.

4. When WeChat calls back notify, it sends a data stream, so GET and POST cannot obtain the data notified asynchronously after payment. When using the official SDK, you can change it like this:

$GLOBALS["HTTP_RAW_POST_DATA"] = file_get_contents("php://input", "r");
$notify = new PayNotifyCallBack();
$notify->Handle(false);
Copy after login

5. When accessing Alipay on PC browser with an ios device, the Alipay client will pop up for payment. In this way, asynchronous and synchronous notifications cannot be received, so you need to determine whether the access device is a mobile terminal or a client. If so, For mobile devices, you must use Alipay’s wap method to pay

6. Tenpay payment QQ browser payment always has wrong parameters, I haven’t found the reason yet.

Remind everyone to be careful when using OpenCart to develop Alipay, Tenpay, and WeChat payments. Thank you friends for paying attention to the Bangkejia website. Here, the editor of Script Scaffold wishes everyone a happy National Day.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1058155.htmlTechArticleDeveloping Alipay, Tenpay, and WeChat payment parameter errors based on OpenCart. OpenCart Pay has recently integrated Alipay into OpenCart , Tenpay and WeChat scan code payment, in fact these plug-ins are...
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1664
14
PHP Tutorial
1268
29
C# Tutorial
1242
24
How to solve the problem of 'Undefined array key 'sign'' error when calling Alipay EasySDK using PHP? How to solve the problem of 'Undefined array key 'sign'' error when calling Alipay EasySDK using PHP? Mar 31, 2025 pm 11:51 PM

Problem Description When calling Alipay EasySDK using PHP, after filling in the parameters according to the official code, an error message was reported during operation: "Undefined...

List of handling fees for okx trading platform List of handling fees for okx trading platform Feb 15, 2025 pm 03:09 PM

The OKX trading platform offers a variety of rates, including transaction fees, withdrawal fees and financing fees. For spot transactions, transaction fees vary according to transaction volume and VIP level, and adopt the "market maker model", that is, the market charges a lower handling fee for each transaction. In addition, OKX also offers a variety of futures contracts, including currency standard contracts, USDT contracts and delivery contracts, and the fee structure of each contract is also different.

The difference between H5 and mini-programs and APPs The difference between H5 and mini-programs and APPs Apr 06, 2025 am 10:42 AM

H5. The main difference between mini programs and APP is: technical architecture: H5 is based on web technology, and mini programs and APP are independent applications. Experience and functions: H5 is light and easy to use, with limited functions; mini programs are lightweight and have good interactiveness; APPs are powerful and have smooth experience. Compatibility: H5 is cross-platform compatible, applets and APPs are restricted by the platform. Development cost: H5 has low development cost, medium mini programs, and highest APP. Applicable scenarios: H5 is suitable for information display, applets are suitable for lightweight applications, and APPs are suitable for complex functions.

Sesame Open Door Login Registration Entrance gate.io Exchange Registration Official Website Entrance Sesame Open Door Login Registration Entrance gate.io Exchange Registration Official Website Entrance Mar 04, 2025 pm 04:51 PM

Gate.io (Sesame Open Door) is the world's leading cryptocurrency trading platform. This article provides a complete tutorial on spot trading of Gate.io. The tutorial covers steps such as account registration and login, KYC certification, fiat currency and digital currency recharge, trading pair selection, limit/market transaction orders, and orders and transaction records viewing, helping you quickly get started on the Gate.io platform for cryptocurrency trading. Whether a beginner or a veteran, you can benefit from this tutorial and easily master the Gate.io trading skills.

Ouyi Exchange app domestic download tutorial Ouyi Exchange app domestic download tutorial Mar 21, 2025 pm 05:42 PM

This article provides a detailed guide to safe download of Ouyi OKX App in China. Due to restrictions on domestic app stores, users are advised to download the App through the official website of Ouyi OKX, or use the QR code provided by the official website to scan and download. During the download process, be sure to verify the official website address, check the application permissions, perform a security scan after installation, and enable two-factor verification. During use, please abide by local laws and regulations, use a safe network environment, protect account security, be vigilant against fraud, and invest rationally. This article is for reference only and does not constitute investment advice. Digital asset transactions are at your own risk.

What are the development tools for H5 and mini program? What are the development tools for H5 and mini program? Apr 06, 2025 am 09:54 AM

H5 development tools recommendations: VSCode, WebStorm, Atom, Brackets, Sublime Text; Mini Program Development Tools: WeChat Developer Tools, Alipay Mini Program Developer Tools, Baidu Smart Mini Program IDE, Toutiao Mini Program Developer Tools, Taro.

Detailed tutorial on how to buy and sell Binance virtual currency Detailed tutorial on how to buy and sell Binance virtual currency Mar 18, 2025 pm 01:36 PM

This article provides a brief guide to buying and selling of Binance virtual currency updated in 2025, and explains in detail the operation steps of virtual currency transactions on the Binance platform. The guide covers fiat currency purchase USDT, currency transaction purchase of other currencies (such as BTC), and selling operations, including market trading and limit trading. In addition, the guide also specifically reminds key risks such as payment security and network selection for fiat currency transactions, helping users to conduct Binance transactions safely and efficiently. Through this article, you can quickly master the skills of buying and selling virtual currencies on the Binance platform and reduce transaction risks.

See all articles