File tree Expand file tree Collapse file tree 4 files changed +13
-5
lines changed Expand file tree Collapse file tree 4 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -745,6 +745,9 @@ public function getTitle()
745
745
*/
746
746
public function getConfigData ($ field , $ storeId = null )
747
747
{
748
+ if ('order_place_redirect_url ' === $ field ) {
749
+ return $ this ->getOrderPlaceRedirectUrl ();
750
+ }
748
751
if (null === $ storeId ) {
749
752
$ storeId = $ this ->getStore ();
750
753
}
Original file line number Diff line number Diff line change @@ -222,7 +222,7 @@ public function isOffline()
222
222
*/
223
223
public function isInitializeNeeded ()
224
224
{
225
- return false ;
225
+ return ( bool )( int ) $ this -> getConfiguredValue ( ' can_initialize ' ) ;
226
226
}
227
227
228
228
/**
@@ -570,6 +570,11 @@ public function assignData($data)
570
570
*/
571
571
public function initialize ($ paymentAction , $ stateObject )
572
572
{
573
+ $ this ->executeCommand (
574
+ 'initialize ' ,
575
+ $ this ->getInfoInstance (),
576
+ ['paymentAction ' => $ paymentAction , 'stateObject ' => $ stateObject ]
577
+ );
573
578
return $ this ;
574
579
}
575
580
Original file line number Diff line number Diff line change @@ -211,8 +211,8 @@ public function getCheckoutRedirectUrl()
211
211
public function getOrderPlaceRedirectUrl ()
212
212
{
213
213
$ method = $ this ->getMethodInstance ();
214
- if ($ method && $ method instanceof AbstractMethod ) {
215
- return $ method ->getOrderPlaceRedirectUrl ( );
214
+ if ($ method ) {
215
+ return $ method ->getConfigData ( ' order_place_redirect_url ' );
216
216
}
217
217
return '' ;
218
218
}
Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ public function place()
256
256
257
257
$ orderState = Order::STATE_NEW ;
258
258
$ orderStatus = $ methodInstance ->getConfigData ('order_status ' );
259
- $ isCustomerNotified = false ;
259
+ $ isCustomerNotified = null ;
260
260
261
261
// Do order payment validation on payment method level
262
262
$ methodInstance ->validate ();
@@ -278,7 +278,7 @@ public function place()
278
278
}
279
279
}
280
280
281
- $ isCustomerNotified = $ isCustomerNotified ?: $ order ->getCustomerNoteNotify ();
281
+ $ isCustomerNotified = $ isCustomerNotified === null ? $ order ->getCustomerNoteNotify () : $ isCustomerNotified ;
282
282
283
283
if (!in_array ($ orderStatus , $ order ->getConfig ()->getStateStatuses ($ orderState ))) {
284
284
$ orderStatus = $ order ->getConfig ()->getStateDefaultStatus ($ orderState );
You can’t perform that action at this time.
0 commit comments