Home php教程 php手册 Website Alipay interface error code: TRADE_DATA_MATCH_ERROR How to deal with it?

Website Alipay interface error code: TRADE_DATA_MATCH_ERROR How to deal with it?

Aug 30, 2016 am 09:21 AM

How to deal with the website Alipay interface error code: TRADE_DATA_MATCH_ERROR? Anyone who has done Alipay payment interface should know that this is caused by repeated orders.

Today when dealing with a customer’s website, according to customer feedback, “error code: TRADE_DATA_MATCH_ERROR” appeared when the customer submitted an order through Alipay. After checking the manual of the Alipay docking platform, the customer had already generated the order on the Alipay platform. , but the payment window was closed before payment was made. When I entered the customer website member backend and clicked to pay, the above error code "TRADE_DATA_MATCH_ERROR" appeared. This means that the attributes of this order must have changed, usually the price. It happened that the backend of a shopping mall website we built for our customers supported price modification, which led to the above problem.

Solution: Re-modify the order number

No matter what your reason is, as long as "error code: TRADE_DATA_MATCH_ERROR" appears, you can modify the order number to resolve the error. We can change the order number while modifying the price in the background. For example, the following is what I changed for the customer

$newsddon=ReturnDdNo();
query("update table set pretotal='$pretotal',ddno='$newsddon' where condition"); //Modify the order number while modifying the price

function ReturnDdNo(){ //Randomly generate order number

$ddno=time().rand(10000,99999);

return $ddno;

}

Of course, the above code is just the program I use. We only need to regenerate/modify a new order number accordingly in the file that modifies the order number price.

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

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)