File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -188,10 +188,7 @@ public function finalizeOrderAfterExternalPayment(string $payPalOrderId, bool $f
188188 $ isPaypalApplePay ||
189189 $ isUAPM
190190 ) {
191- if (
192- $ this ->isPayPalOrderCompleted ($ payPalApiOrder ) ||
193- ($ isUAPM && $ this ->isPayPalOrderApproved ($ payPalApiOrder ))
194- ) {
191+ if ($ this ->isPayPalOrderCompleted ($ payPalApiOrder )) {
195192 $ this ->markOrderPaid ();
196193 $ transactionId = $ this ->extractTransactionId ($ payPalApiOrder );
197194 $ this ->setTransId ($ transactionId );
@@ -202,6 +199,17 @@ public function finalizeOrderAfterExternalPayment(string $payPalOrderId, bool $f
202199 PayPalApiOrder::STATUS_COMPLETED ,
203200 $ transactionId
204201 );
202+ } elseif ($ isUAPM && $ this ->isPayPalOrderApproved ($ payPalApiOrder )) {
203+ $ this ->markOrderPaymentNotFinished ();
204+ $ transactionId = $ this ->extractTransactionId ($ payPalApiOrder );
205+ //prepare capture tracking
206+ $ this ->paymentService ->trackPayPalOrder (
207+ $ this ->getId (),
208+ $ payPalOrderId ,
209+ $ paymentsId ,
210+ PayPalApiOrder::STATUS_APPROVED ,
211+ $ transactionId
212+ );
205213 } else {
206214 throw PayPalException::cannotFinalizeOrderAfterExternalPayment ($ payPalOrderId , $ paymentsId );
207215 }
You can’t perform that action at this time.
0 commit comments