Paypal请求许可服务:很抱歉,您的交易已超时。请重试您的交易

时间:2016-06-24 12:51:34

标签: paypal paypal-subscriptions paypal-permissions

我正在使用paypal请求权限服务为我的沙盒应用授予退款权限。这是

的代码
$url = "https://svcs.sandbox.paypal.com/Permissions/RequestPermissions";

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);

curl_setopt($ch, CURLOPT_VERBOSE, 1);

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);

curl_setopt($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_HTTPHEADER,  array(
    "X-PAYPAL-SECURITY-USERID: username",
    "X-PAYPAL-SECURITY-PASSWORD: password",
    "X-PAYPAL-SECURITY-SIGNATURE: signature",
    "X-PAYPAL-REQUEST-DATA-FORMAT: NV",
    "X-PAYPAL-RESPONSE-DATA-FORMAT: NV",
    "X-PAYPAL-APPLICATION-ID: APP-ID"
));

$detailLevel = urlencode("ReturnAll");

$errorLanguage = urlencode("en_US");

$scope = "REFUND";

$callback = "http://www.domain.com/permission.php";

$nvpreq =  "requestEnvelope.errorLanguage='en_US'&scope=$scope&callback=$callback";

$nvpreq .= "detailLevel=$detailLevel";

curl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);

$result = curl_exec($ch);

curl_close($ch);

echo $result;

使用此代码我收到此消息

  

responseEnvelope.timestamp = 2016-06-24T05%3A30%3A37.350-07%3A00   responseEnvelope.ack =成功   responseEnvelope.correlationId = 06cb98ac28931 /   responseEnvelope.build = 2210301   标记= AAAAAAAi3Sw3MkHlV5t2

但是当我在这个网址中放置令牌时 Redirect the account holder's browser to PayPal and include the request token in the request_token parameter

我收到此错误

  

糟糕!很抱歉,您的交易已超时。请重试您的交易

那为什么会这样呢?我哪里错了?我正在使用此网址而无需登录我的paypal帐户。此流程是否也会授予所有管理员和其他卖家所需的许可?

0 个答案:

没有答案