File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 <language >en_US</language >
1818 <language >fr_FR</language >
1919 </languages >
20- <version >2.0.4 </version >
20+ <version >2.0.5 </version >
2121 <authors >
2222 <author >
2323 <name >Vincent Lopes-Vicente</name >
Original file line number Diff line number Diff line change @@ -612,7 +612,9 @@ public function buildFromOrder(Order $order)
612612 ->findOne ();
613613
614614 foreach ($ order ->getOrderProducts () as $ orderProduct ) {
615- $ this ->addProduct ((new PayPlugProduct ())->buildFromOrderProduct ($ orderProduct , $ payPlugDeliveryType ));
615+ if ($ orderProduct ->getPrice () > 0 ){
616+ $ this ->addProduct ((new PayPlugProduct ())->buildFromOrderProduct ($ orderProduct , $ payPlugDeliveryType ));
617+ }
616618 }
617619 }
618620
Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ public function isValidPayment()
8282 public function pay (Order $ order )
8383 {
8484 try {
85+
8586 /** @var PaymentService $paymentService */
8687 $ paymentService = $ this ->container ->get ('payplugmodule_payment_service ' );
8788
@@ -90,7 +91,6 @@ public function pay(Order $order)
9091 $ isMultiPayment = $ this ->getRequest ()->getSession ()->get (OrderFormListener::PAY_PLUG_MULTI_PAYMENT_FIELD_NAME , 0 );
9192 if ($ isMultiPayment ) {
9293 $ orderTotalAmount = $ order ->getTotalAmount ();
93-
9494 $ minAmount = PayPlugModule::getConfigValue (PayPlugConfigValue::MULTI_PAYMENT_MINIMUM );
9595 $ maxAmount = PayPlugModule::getConfigValue (PayPlugConfigValue::MULTI_PAYMENT_MAXIMUM );
9696
@@ -124,6 +124,7 @@ public function pay(Order $order)
124124 if ($ this ->getRequest ()->isXmlHttpRequest ()) {
125125 return new JsonResponse (['error ' => $ exception ->getMessage ()], 400 );
126126 }
127+ Tlog::getInstance ()->addError ('Error PayPlugModule::pay() : ' . $ exception ->getMessage ());
127128 return new RedirectResponse (URL ::getInstance ()->absoluteUrl ('error ' ));
128129 }
129130
You can’t perform that action at this time.
0 commit comments