In function uc_paypal_ec_submit_form_submit, the return value (nvp_response) of uc_paypal_api_request is not checked for failure.

This problem was triggered by a complex interaction of uc_price, uc_vat and uc_taxes, where it ended up with:

AMT < ITEMAMT + TAXAMT

Request that would cause silent failure (irrelevant key/value pair removed):

    [AMT] => 1.95
    [ITEMAMT] => 1.76
    [SHIPPINGAMT] => 0.00
    [TAXAMT] => 0.20

Response of failure (irrelevant key/value pair removed):

    [ACK] => Failure
    [VERSION] => 3.0
    [L_ERRORCODE0] => 10413
    [L_SHORTMESSAGE0] => Transaction refused because of an invalid argument. See additional error messages for details.
    [L_LONGMESSAGE0] => The totals of the cart item amounts do not match order amounts.
    [L_SEVERITYCODE0] => Error

Comments

tr’s picture

Status: Active » Closed (duplicate)

Duplicate of #952648: Paypal response not checked for failure when submitting express checkout. Please contribute to that issue to help get it resolved.