Project integration Alipay error: debugging error, please go back to the source of the request and initiate the request again. Error code invalid-app-id Error reason: Invalid ApplD parameter

question

Project integration Alipay error: debugging error, please go back to the source of the request and initiate the request again. Error code invalid-app-id Error reason: Invalid ApplD parameter

detailed question

The author operates according to the Alipay sandbox payment fast integration version , and the operation is completed to access the integrated Alipay. The page is as follows
insert image description here

solution

Modify the GATEWAY_URL in AliPayController
to change it from

private static final String GATEWAY_URL = "https://openapi.alipaydev.com/gateway.do";

change into

private static final String GATEWAY_URL = "https://openapi-sandbox.dl.alipaydev.com/gateway.do";

wrong reason

It is caused by the incorrect configuration of the gateway URL in the Alipay sandbox environment. In the author's code, GATEWAY_URL is set to https://openapi.alipaydev.com/gateway.do, which is the gateway URL of Alipay's official environment.

solve the cause

Modify GATEWAY_URL to the gateway URL of the Alipay sandbox environment, ie https://openapi-sandbox.dl.alipaydev.com/gateway.do.

It’s not easy
to be original, please indicate the source
if it’s helpful to you, don’t forget to like it and support it
insert image description here

Guess you like

Origin blog.csdn.net/T_Y_F_/article/details/131606653