Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report