Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the parameter errors of Alipay, Tenpay and WeChat Pay in OpenCart development

Shulou Source: shulou.com Published: 2022-06-03 09:10:31 11月15日 Update

This article mainly explains "how to solve the parameter errors of Alipay, Tenpay and WeChat Pay in OpenCart development". The explanation in the article is simple and clear and easy to learn and understand. please follow the editor's train of thought to study and learn "how to solve the parameter error problem of Alipay, Tenpay and WeChat Pay in OpenCart development".

1. The notify_url address in Wechat native Mode 2 must be a public network address.

two。 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

In the synchronous callback processing of Alipay and Tenpay in 3.OpenCart, it is better for unset ($_ GET ['route']) to verify the payment callback again, otherwise the callback verification will not succeed because this extra parameter participates in the calibration check.

4. Wechat sends data streams when calling back notify, so GET and POST cannot get the data notified asynchronously after payment. You can modify it by using the official SDK:

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

Alipay of 5.PC browser will pop up Alipay client to pay when accessing with ios device, so you can't receive asynchronous and synchronous notification, so you need to judge whether the access device is mobile or client. If it is mobile, you have to use Alipay's wap method to pay.

Thank you for your reading, the above is the content of "how to solve the parameter error problem of OpenCart development Alipay, Tenpay, WeChat Pay". After the study of this article, I believe you have a deeper understanding of how to solve the parameter error problem of OpenCart development Alipay, Tenpay and WeChat Pay, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Payment parameters problems errors development time learning validation content address customer client data device synchronization mobility success official that is form Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia MariaDB Shulou Tech Info Shulou Information OPPO Reno