【问题标题】:PayPal METHOD = DoDirectPayment #10759 errorPayPal 方法 = DoDirectPayment #10759 错误
【发布时间】:2016-09-26 13:28:27
【问题描述】:

我正在通过 DoDirectPayment 方法使用 Paypal 交易,我已经验证了我的 API 凭据大约 100 次;没有错。

 Array (
        [TIMESTAMP] => 0000-00-00T00:00:00Z
        [CORRELATIONID] => 0000000000
        [ACK] => Failure
        [VERSION] => 56.0
        [BUILD] => 000000
        [L_ERRORCODE0] => 10759
        [L_SHORTMESSAGE0] => Transaction cannot be processed.
        [L_LONGMESSAGE0] => Please use a different payment card.
        [L_SEVERITYCODE0] => Error
        [AMT] => 0.50
        [CURRENCYCODE] => USD
)

以上是我从贝宝收到的回复。

我从这里尝试了所有卡:https://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card_numbers.htm

我的代码:

$request  = 'METHOD=DoDirectPayment';
$request .= '&VERSION=56.0';
$request .= '&USER='.$paypal_user;
$request .= '&PWD='.$paypal_pass;
$request .= '&SIGNATURE='.$paypal_sign;
$request .= '&CUSTREF=' . $post_id;
$request .= '&PAYMENTACTION=Authorization';
$request .= '&AMT='.$amount;
$request .= '&EXPDATE=' . $expmonth . $expyear;
$request .= '&CVV2=' . $ccv;
$request .= '&ACCT=' . $card_number;
$request .= '&CURRENCYCODE=USD';
$request .= '&IPADDRESS=' . urlencode($_SERVER['REMOTE_ADDR']);
$request .= '&CREDITCARDTYPE=' . $cardtype; // VISA AND ALL

$curl = curl_init($apiurl);
curl_setopt($curl, CURLOPT_PORT, 443);
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_FORBID_REUSE, 1);
curl_setopt($curl, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $request);

// Request to paypal
$response = curl_exec($curl);

请让我知道我在这里缺少什么。

【问题讨论】:

  • 您是否将测试卡数据发送到 sandbox(相对于生产)endpoints?如果将 test 卡发送到生产环境,该错误指向 Paypal declining 卡......
  • 我不明白你的意思?我正在使用沙盒帐户进行测试付款,并且在测试交易时收到此错误。

标签: php wordpress paypal


【解决方案1】:

该 URL 提供的卡片在沙盒中已被大量使用,以至于它们不再起作用。他们使用 PayFlow 可以,但使用 DoDirectPayment 则不行。

当你需要它们时,generate fresh numbers here。那里生成的任何数字都适用于任何安全代码和有效的到期日期。

【讨论】:

  • 是的,上面的卡片详细信息对我有用。但是,为什么我不应该使用 PayPal 提供的标准卡详细信息?代码有什么问题吗?
  • 这些数字只是被过度使用,系统不再喜欢它们。如果您的代码使用新生成的数字,那么您的代码就可以了。
  • 谢谢,@Andrew Angell 我的代码正在使用新生成的数字。
【解决方案2】:

您可以尝试在下面页面的第 4 步中创建新的虚拟卡信息,然后再次尝试测试。

https://www.paypal-knowledge.com/infocenter/index?page=content&widgetview=true&id=FAQ1413

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-04-15
    • 2012-07-28
    • 2016-07-13
    • 1970-01-01
    • 2013-02-23
    • 1970-01-01
    • 2013-05-09
    • 1970-01-01
    相关资源
    最近更新 更多