magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.54k stars 9.32k forks source link

Magento 2.1.8 Paypal Express Checkout 10413 Error #14037

Closed ogcircle closed 6 years ago

ogcircle commented 6 years ago

Preconditions

  1. Magento 2.1.8
  2. PHP 7.1

Steps to reproduce

  1. Place an order, and check out, then click continue to Paypal

  2. Redirect to Paypal Website for payment. Check the debug log, at this point AMT was set to 1024.36, which is the total amount of order items and shipping fee.

    Request Snippet: ...... 'AMT' => '1024.36', 'CURRENCYCODE' => 'USD', 'SOLUTIONTYPE' => 'Sole', 'SHIPPINGAMT' => '274.36', 'ITEMAMT' => '750.00', 'TAXAMT' => '0.00', 'BUSINESS' => NULL, 'NOTETEXT' => NULL, ......

    Response: ...... 'TOKEN' => 'EC-00J631662Y565405G', 'ACK' => 'Success', 'VERSION' => '72.0', 'BUILD' => '43715881',

  3. Make payment in Paypal and clicked Pay Now button

  4. After the payment was processed in Paypal, it brought the page back to our website. This is where we saw the issue. In the log file, the AMT was changed to 750.00 after redirect back from Paypal. Request Snippet: ...... 'PAYMENTACTION' => 'Sale', 'AMT' => '750.00', 'CURRENCYCODE' => 'USD', 'BUTTONSOURCE' => 'Magento_Cart_Community', 'RETURNFMFDETAILS' => 1, 'SHIPPINGAMT' => '274.36', 'ITEMAMT' => '750.00', 'TAXAMT' => '0.00', ......

    Response: ...... 'SUCCESSPAGEREDIRECTREQUESTED' => 'false', 'ACK' => 'Failure', 'VERSION' => '72.0', 'BUILD' => '43715881', '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',

Expected result

  1. I think the AMT should be item amount + shipping amount. When check out to Paypal it seemed fine. Not sure why AMT was changed to order item amount.

Actual result

  1. We also tried to turn on/off transferring the order and shipping amount, but still got this issue.
ghost commented 6 years ago

Hi @ogcircle thank you for you report, The fix for this issue has already available in 2.1-develop branch.

JMLucas96 commented 4 years ago

@ghost Can you reference pull request that solves this issue?