Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit d8d1388

Browse files
author
Michael Yu
committed
MAGETWO-71765: Impossible perform partial invoice for order placed with taxes and PayPal Payflow Pro
- Fixed return type for _getCaptureAmount. - Swapped out round($amount, 2) for formatPrice.
1 parent 0c26a71 commit d8d1388

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/code/Magento/Paypal/Model/Payflowpro.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ public function authorize(\Magento\Payment\Model\InfoInterface $payment, $amount
392392
* Get capture amount
393393
*
394394
* @param float $amount
395-
* @return float
395+
* @return string|int
396396
*/
397397
protected function _getCaptureAmount($amount)
398398
{
@@ -512,7 +512,7 @@ public function refund(\Magento\Payment\Model\InfoInterface $payment, $amount)
512512
$request = $this->buildBasicRequest();
513513
$request->setTrxtype(self::TRXTYPE_CREDIT);
514514
$request->setOrigid($payment->getParentTransactionId());
515-
$request->setAmt(round($amount, 2));
515+
$request->setAmt($this->formatPrice($amount));
516516
$response = $this->postRequest($request, $this->getConfig());
517517
$this->processErrors($response);
518518

@@ -607,7 +607,7 @@ public function postRequest(DataObject $request, ConfigInterface $config)
607607
protected function _buildPlaceRequest(DataObject $payment, $amount)
608608
{
609609
$request = $this->buildBasicRequest();
610-
$request->setAmt(round($amount, 2));
610+
$request->setAmt($this->formatPrice($amount));
611611
$request->setAcct($payment->getCcNumber());
612612
$request->setExpdate(sprintf('%02d', $payment->getCcExpMonth()) . substr($payment->getCcExpYear(), -2, 2));
613613
$request->setCvv2($payment->getCcCid());

0 commit comments

Comments
 (0)