File tree 2 files changed +1
-3
lines changed
2 files changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ private function cancelOrderByPaymentStatus(
220
220
try {
221
221
$ cmPayment = $ this ->cmPaymentRepository ->getByOrderKey ($ cmOrder ->getOrderKey ());
222
222
if (in_array ($ order ->getPayment ()->getMethod (), self ::SHOULD_CANCEL_PAYMENT_METHODS ) && $ cmPayment ) {
223
- foreach ($ cmOrderDetails ->getPayments () as $ payment ) {
223
+ foreach ($ cmOrderDetails ->getPayments () as $ payment ) {
224
224
if ($ payment ->getAuthorization ()->getState () === Authorization::STATE_AUTHORIZED ) {
225
225
return ;
226
226
}
Original file line number Diff line number Diff line change @@ -245,14 +245,12 @@ public function testShouldNotCancelOrderWhenCreditCardDirectPaymentIsRedirectedF
245
245
->expects ($ this ->once ())->method ('execute ' )
246
246
->willReturn ($ this ->mockApiResponse ->getOrderDetailRedirectedForAuthenticationPayment ());
247
247
248
-
249
248
$ magentoOrder = $ this ->loadOrderById ('100000001 ' );
250
249
$ magentoOrder ->getPayment ()->setMethod ('cm_payments_creditcard ' );
251
250
$ repository = $ this ->objectManager ->get (OrderRepositoryInterface::class);
252
251
$ repository ->save ($ magentoOrder );
253
252
254
253
$ this ->createCmOrder ($ magentoOrder );
255
-
256
254
$ this ->createCMPayment ($ magentoOrder );
257
255
258
256
$ this ->orderTransactionService ->process ('100000001 ' );
You can’t perform that action at this time.
0 commit comments