Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ihor-sviziev/4716c6d79fb728078ddd to your computer and use it in GitHub Desktop.
Save ihor-sviziev/4716c6d79fb728078ddd to your computer and use it in GitHub Desktop.
PayPal_Express_-_Fix_work_with_discount.patch
Index: magento/app/code/core/Mage/PaypalUk/Model/Api/Nvp.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- magento/app/code/core/Mage/PaypalUk/Model/Api/Nvp.php (revision 443087c1a542e65b0f1f1c43f3e3e82783a05251)
+++ magento/app/code/core/Mage/PaypalUk/Model/Api/Nvp.php (revision )
@@ -609,7 +609,7 @@
$this->_lineItemTotalExportMap = array(
Mage_Paypal_Model_Cart::TOTAL_TAX => 'TAXAMT',
Mage_Paypal_Model_Cart::TOTAL_SHIPPING => 'FREIGHTAMT',
- 'amount' => 'PAYMENTREQUEST_0_ITEMAMT',
+ Mage_Paypal_Model_Cart::TOTAL_SUBTOTAL => 'PAYMENTREQUEST_0_ITEMAMT',
);
$this->_lineItemExportItemsFormat = array(
'name' => 'L_PAYMENTREQUEST_0_NAME%d',
@ihor-sviziev
Copy link
Author

This field appeared, but it doesn't fix issue with paypal when we using "&" and "=" symbols in product names.

Please use additional fix for this issue.
https://gist.github.com/ihor-sviziev/f804e689acd83b8ab5f0

@vinaysikarwar
Copy link

when adding a custom discount it is giving an error
PayPal gateway rejected the request. Field format error: 10413-The totals of the cart item amounts do not match order amounts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment