Search code examples
paypalexpress-checkout

Paypal Error Message 'Buyer cannot pay.' when trying to capture multiple times


I use Express Checkout of Paypal. The problem is, when I try to capture authorization multiple times. I got fail response.

Total amount of this payment is 800.

I want to capture authorization of each item.

this is the first request. I try to capture item amount in 'L_AMT0'

    $captureData = array(
        'AUTHORIZATIONID'   => $payment->payment_id,
        'AMT'               => $amount,  // '41.00'
        'COMPLETETYPE'      => 'Complete',
        'CURRENCYCODE'      => 'SGD',
    );

    $response = $merchant->doCapture($captureData);

This is some parts of the first response after capture the first item. Everything looks fine.

'ACK' => string 'Success' (length=7)
'TRANSACTIONTYPE' => string 'cart' (length=4)
'PAYMENTTYPE' => string 'instant' (length=7)
'AMT' => string '800.00' (length=6)
'L_AMT0' => string '759.00' (length=6)
'L_AMT1' => string '41.00' (length=5)

So I make a second amount and got this error.

'AUTHORIZATIONID' => string '*****************' (length=17)
'TIMESTAMP' => string '2015-09-09T09:14:51Z' (length=20)
'CORRELATIONID' => string '*************' (length=13)
'ACK' => string 'Failure' (length=7)
'VERSION' => string '115' (length=3)
'BUILD' => string '17972692' (length=8)
'L_ERRORCODE0' => string '10606' (length=5)
'L_SHORTMESSAGE0' => string 'Buyer cannot pay.' (length=17)
'L_LONGMESSAGE0' => string 'Transaction rejected, please contact the buyer.' (length=47)
'L_SEVERITYCODE0' => string 'Error' (length=5)

So can you help me find what is wrong with my request?


Solution

  • Ok I got the solution now.

    Just change COMPLETETYPE to 'NotComplete' for the first and the following captures.

    Then change it to 'Complete' at the last capture.

    https://developer.paypal.com/docs/classic/api/merchant/DoCapture_API_Operation_NVP/