PayPal METHOD = DoDirectPayment #10759 error

I am using Paypal transaction by DoDirectPayment method, I have verified my API credentials about 100 times; it’s not wrong.

 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
)

Above is response what I am getting from paypal.

Read More

I am tried all cards from here: https://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card_numbers.htm

My Code:

$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);

Please let me know what I am missing here.

Related posts

Leave a Reply

2 comments

  1. The cards provided at that URL have been used so much in the sandbox that they simply don’t work anymore. With PayFlow they do, but not with DoDirectPayment.

    Instead, generate fresh numbers here when you need them. Any number generated there will work with any security code and valid expiration date.