Skip to content

Commit

Permalink
MAGETWO-58376: PayPal Payflow Pro always using USD (even if this curr…
Browse files Browse the repository at this point in the history
…ency is absent on your store) - for 2.1
  • Loading branch information
ameysar committed Nov 7, 2016
1 parent 2347bc6 commit 1c7f70d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/code/Magento/Paypal/Model/Payflow/Transparent.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ public function authorize(InfoInterface $payment, $amount)
$request->setData('trxtype', self::TRXTYPE_AUTH_ONLY);
$request->setData('origid', $token);
$request->setData('amt', $this->formatPrice($amount));
$request->setData('currency', $order->getBaseCurrencyCode());

$response = $this->postRequest($request, $this->getConfig());
$this->processErrors($response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ protected function initializationAuthorizeMock()
$this->orderMock = $this->getMockBuilder('Magento\Sales\Model\Order')
->setMethods([
'getCustomerId', 'getBillingAddress', 'getShippingAddress', 'getCustomerEmail',
'getId', 'getIncrementId'
'getId', 'getIncrementId', 'getBaseCurrencyCode'
])
->disableOriginalConstructor()
->getMock();
Expand Down Expand Up @@ -164,6 +164,9 @@ protected function buildRequestData()
$this->paymentMock->expects($this->once())
->method('getOrder')
->willReturn($this->orderMock);
$this->orderMock->expects($this->once())
->method('getBaseCurrencyCode')
->willReturn('USD');
$this->orderMock->expects($this->once())
->method('getBillingAddress')
->willReturn($this->addressBillingMock);
Expand Down

0 comments on commit 1c7f70d

Please sign in to comment.