Created
November 5, 2015 10:24
-
-
Save ihor-sviziev/f804e689acd83b8ab5f0 to your computer and use it in GitHub Desktop.
PayPal_Express_-_Fix_work_with_discount_v2.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 de8690ea226be70199072586fead08fd204b3774) | |
+++ magento/app/code/core/Mage/PaypalUk/Model/Api/Nvp.php (revision ) | |
@@ -519,9 +519,14 @@ | |
protected function _buildQuery($request) | |
{ | |
$result = ''; | |
- foreach ($request as $k=>$v) { | |
+ foreach ($request as $k => $v) { | |
+ if (mb_stripos($v, '&') !== false || mb_stripos($v, '=') !== false) { | |
+ $k .= '[' . mb_strlen($v) . ']'; | |
+ } | |
+ | |
- $result .= '&'.$k.'='.$v; | |
+ $result .= '&' . $k . '=' . $v; | |
} | |
+ | |
return trim($result, '&'); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment