2

我正在调用AdaptivePaymentService.PaymentDetails()以获取付款的付款详细信息,它抛出一个 ConnectionException 指示 404。为了调试问题,我下载了 AdaptivePayment SDK 的源代码以及 Core SDK 并逐步执行了代码,特别是, 就在HttpRequest中执行的地方Paypal.HttpConnection.Execute()

似乎所有配置变量都从 web.config 中读取:

在此处输入图像描述

底层 httpRequest 中的地址看起来是正确的:

在此处输入图像描述

有效载荷看起来正确:

在此处输入图像描述

但是,会引发 WebException 并返回以下响应:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /cgi-bin/ppapi was not found on this server.</p>
<p>Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.</p>
<hr>
<address>Apache Server at <a href="mailto:ppmtps@paypal.com">api.sandbox.paypal.com</a> Port 443</address>
</body></html>

任何帮助将不胜感激。

4

1 回答 1

1

由于您在配置中同时配置了 ClientId/Secret 和 3-token 凭据(API 用户名、密码、签名),因此端点检测不正确,从而使 REST API 具有更高的优先级。请删除客户端 ID/秘密配置,您应该会看到端点正确设置为https://svcs.sandbox.paypal.com/AdaptivePayments/PaymentDetails

于 2013-10-23T11:23:13.433 回答