dongxin9759 2012-03-06 08:10
浏览 213

获取L_ERRORCODE0 = 10001&超时处理请求

I am trying to simulate a dummy parallel payment to 2 users using curl. I have done everything as per documentation but the problem is I am getting

Getting L_ERRORCODE0=10001& Timeout processing request

I dont know why.

My code is as follows:

<?php
   $data = array(
     'USER'=>urlencode('xxx'),
     'PWD'=>urlencode('xxxx'),
     'SIGNATURE'=>urlencode('xxxx'),
     'VERSION'=>urlencode('86.0'),
     'METHOD'=>urlencode('SetExpressCheckout'),
     'RETURNURL'=>urlencode('http://75.125.190.162:7132/sample/php_nvp_samples/myCheckout.php'),
     'CANCELURL'=>urlencode('http://75.125.190.162:7132/sample/php_nvp_samples/myCheckout.php'),
     'PAYMENTREQUEST_0_CURRENCYCODE'=>urlencode('USD'),
     'PAYMENTREQUEST_0_AMT'=>urlencode('300'),
     'PAYMENTREQUEST_0_ITEMAMT'=>urlencode('200'),
     'PAYMENTREQUEST_0_TAXAMT'=>urlencode('100'),
     'PAYMENTREQUEST_0_DESC'=>urlencode('Summer Vacation trip'),
     'PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID'=>urlencode('himans_1331094418_biz@smartdatainc.net'),
     'PAYMENTREQUEST_0_PAYMENTACTION'=>urlencode('Order'),
     'PAYMENTREQUEST_0_PAYMENTREQUESTID'=>urlencode('CART26488-PAYMENT0'),
     'PAYMENTREQUEST_1_CURRENCYCODE'=>urlencode('USD'),
     'PAYMENTREQUEST_1_AMT'=>urlencode('100'),
     'PAYMENTREQUEST_1_ITEMAMT'=>urlencode('50'),
     'PAYMENTREQUEST_1_TAXAMT'=>urlencode('50'),
     'PAYMENTREQUEST_1_DESC'=>urlencode('Dancing class'),
     'PAYMENTREQUEST_1_SELLERPAYPALACCOUNTID'=>urlencode('himans_1320303266_biz@smartdatainc.net'),
     'PAYMENTREQUEST_1_PAYMENTACTION'=>urlencode('Order'),
     'PAYMENTREQUEST_1_PAYMENTREQUESTID'=>urlencode('CART26485-PAYMENT0')
  );

  $curl = curl_init('https://api-3t.sandbox.paypal.com/nvp');                       
        curl_setopt($curl,CURLOPT_RETURNTRANSFER ,1);                              
        curl_setopt($curl,CURLOPT_HTTPGET ,true);                                    
        curl_setopt($curl,CURLOPT_POSTFIELDS ,$data);              
   $response = curl_exec($curl);
   echo $response;
   exit;
   curl_close($curl);         
?>

Here is the vardump of the request:

array(15) { 
  ["USER"]=> string(43) "XXX"
  ["PWD"]=> string(10) "XXX"
  ["SIGNATURE"]=> string(56) "XXX"
  ["VERSION"]=> string(4) "56.0"
  ["METHOD"]=> string(18) "SetExpressCheckout"
  ["RETURNURL"]=> string(78)
    "http%3A%2F%2F75.125.190.162%3A7132%2Fsample%2Fphp_nvp_samples%2FmyCheckout.php"
  ["CANCELURL"]=> string(78)
    "http%3A%2F%2F75.125.190.162%3A7132%2Fsample%2Fphp_nvp_samples%2FmyCheckout.php"
  ["PAYMENTREQUEST_0_CURRENCYCODE"]=> string(3) "USD"
  ["PAYMENTREQUEST_0_AMT"]=> string(3) "100"
  ["PAYMENTREQUEST_0_ITEMAMT"]=> string(2) "50"
  ["PAYMENTREQUEST_0_TAXAMT"]=> string(2) "20"
  ["PAYMENTREQUEST_0_DESC"]=> string(13) "Dancing class"
  ["PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID"]=> string(21) "seller-136@paypal.com"
  ["PAYMENTREQUEST_0_PAYMENTACTION"]=> string(5) "Order"
  ["PAYMENTREQUEST_0_PAYMENTREQUESTID"]=> string(18) "CART26485-PAYMENT0"
} 

API Credentials removed intentionally.

And here is the response:

   TIMESTAMP=2012%2d03%2d06T09%3a29%3a41Z
  &CORRELATIONID=184b37b1fd85
  &ACK=Failure
  &L_ERRORCODE0=10001
  &L_SHORTMESSAGE0=Internal%20Error
  &L_LONGMESSAGE0=Timeout%20processing%20request
  • 写回答

3条回答 默认 最新

  • doulu7921 2012-03-07 03:34
    关注

    Are you using a Payflow test credit card?

    Payflow's test credit cards are banned in the sandbox, in a word. You will always get a 10001 response with the below Payflow test credit cards (see page 49 & 50):

    • American Express
      • 378282246310005
      • 371449635398431
    • American Express Corporate
      • 378734493671000
    • Diners Club
      • 30569309025904
      • 38520000023237
    • Discover
      • 6011111111111117
      • 6011000990139424
    • JCB
      • 3530111333300000
      • 3566002020360505
    • MasterCard
      • 5555555555554444
      • 5105105105105100
    • Visa
      • 4111111111111111
      • 4012888888881881
      • 4222222222222 -- NOTE: Even though this number has a different character count than the other test numbers, it is the correct and functional number
    评论

报告相同问题?

悬赏问题

  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用