@@ -256,7 +256,7 @@ public function place()
256
256
257
257
$ orderState = Order::STATE_NEW ;
258
258
$ orderStatus = $ methodInstance ->getConfigData ('order_status ' );
259
- $ isCustomerNotified = null ;
259
+ $ isCustomerNotified = $ order -> getCustomerNoteNotify () ;
260
260
261
261
// Do order payment validation on payment method level
262
262
$ methodInstance ->validate ();
@@ -267,9 +267,11 @@ public function place()
267
267
$ stateObject = new \Magento \Framework \Object ();
268
268
// For method initialization we have to use original config value for payment action
269
269
$ methodInstance ->initialize ($ methodInstance ->getConfigData ('payment_action ' ), $ stateObject );
270
- $ orderState = $ stateObject ->getState () ?: $ orderState ;
271
- $ orderStatus = $ stateObject ->getStatus () ?: $ orderStatus ;
272
- $ isCustomerNotified = $ stateObject ->getIsNotified ();
270
+ $ orderState = $ stateObject ->getData ('state ' ) ?: $ orderState ;
271
+ $ orderStatus = $ stateObject ->getData ('status ' ) ?: $ orderStatus ;
272
+ $ isCustomerNotified = $ stateObject ->hasData ('is_notified ' )
273
+ ? $ stateObject ->getData ('is_notified ' )
274
+ : $ isCustomerNotified ;
273
275
} else {
274
276
$ orderState = Order::STATE_PROCESSING ;
275
277
$ this ->processAction ($ action , $ order );
@@ -278,8 +280,6 @@ public function place()
278
280
}
279
281
}
280
282
281
- $ isCustomerNotified = $ isCustomerNotified === null ? $ order ->getCustomerNoteNotify () : $ isCustomerNotified ;
282
-
283
283
if (!in_array ($ orderStatus , $ order ->getConfig ()->getStateStatuses ($ orderState ))) {
284
284
$ orderStatus = $ order ->getConfig ()->getStateDefaultStatus ($ orderState );
285
285
}
0 commit comments