Skip to content

Commit 17f8406

Browse files
committed
MAGETWO-68833: [Magento Cloud] - Paypal shows error in checkout but order still goes through but all subsequent orders fail afterwards
- Removed Payflow Pro Express fields outdated mapping - Added string conversion for request fields
1 parent 62667cb commit 17f8406

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

app/code/Magento/Paypal/Model/Api/AbstractApi.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ abstract class AbstractApi extends \Magento\Framework\DataObject
5252
/**
5353
* @var array
5454
*/
55-
protected $_lineItemExportItemsFilters = [];
55+
protected $_lineItemExportItemsFilters = [
56+
'name' => 'convertToString'
57+
];
5658

5759
/**
5860
* @var array
@@ -354,6 +356,17 @@ public function getFraudManagementFiltersEnabled()
354356
return 1;
355357
}
356358

359+
/**
360+
* Converts provided value to string.
361+
*
362+
* @param string|int|\Magento\Framework\Phrase $value
363+
* @return string
364+
*/
365+
public function convertToString($value)
366+
{
367+
return strval($value);
368+
}
369+
357370
/**
358371
* Export $this public data to private request array
359372
*

app/code/Magento/Paypal/Model/Api/PayflowNvp.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -773,11 +773,6 @@ protected function _exportLineItems(array &$request, $i = 0)
773773
Cart::AMOUNT_SHIPPING => 'FREIGHTAMT',
774774
'amount' => 'PAYMENTREQUEST_0_ITEMAMT',
775775
];
776-
$this->_lineItemExportItemsFormat = [
777-
'name' => 'L_PAYMENTREQUEST_0_NAME%d',
778-
'qty' => 'L_PAYMENTREQUEST_0_QTY%d',
779-
'amount' => 'L_PAYMENTREQUEST_0_AMT%d',
780-
];
781776
$request = $requestBefore;
782777
$result = parent::_exportLineItems($request, $i);
783778
/** @var Nvp $paypalNvp */

0 commit comments

Comments
 (0)