Permalink
Browse files

fixed #3722 - Paypal - Order total is invalid.

  • Loading branch information...
fashxp committed Dec 7, 2018
1 parent f9a753a commit 3487e9c0a81dd1d3d6ce7cd87c004befc699b031
Showing with 2 additions and 3 deletions.
  1. +2 −3 bundles/EcommerceFrameworkBundle/PaymentManager/Payment/PayPal.php
@@ -345,7 +345,7 @@ protected function createPaymentDetails(IPrice $price, ?AbstractOrder $order)
// create order total
$paymentDetails = new \stdClass();
$paymentDetails->OrderTotal = new \stdClass();
$paymentDetails->OrderTotal->_ = $price->getAmount()->asNumeric();
$paymentDetails->OrderTotal->_ = $price->getAmount()->asString(2);
$paymentDetails->OrderTotal->currencyID = $price->getCurrency()->getShortName();
if (!$order) {
@@ -363,8 +363,7 @@ protected function createPaymentDetails(IPrice $price, ?AbstractOrder $order)
$article->Number = $item->getProduct()->getOSProductNumber();
$article->Quantity = $item->getAmount();
$article->Amount = new \stdClass();
$article->Amount->_ = $item->getProduct()->getOSPrice()->getGrossAmount()->asNumeric();
$article->Amount->currencyID = $orderCurrency;
$article->Amount->_ = $item->getProduct()->getOSPrice()->getGrossAmount()->asString(2);
$article->Amount->currencyID = $orderCurrency;
$paymentDetails->PaymentDetailsItem[] = $article;

0 comments on commit 3487e9c

Please sign in to comment.