File tree Expand file tree Collapse file tree 1 file changed +24
-19
lines changed
view/frontend/web/js/view/payment/method-renderer Expand file tree Collapse file tree 1 file changed +24
-19
lines changed Original file line number Diff line number Diff line change @@ -91,25 +91,30 @@ define(
9191 } ,
9292 placeOrderPos : function ( ) {
9393 let self = this ;
94- fullScreenLoader . startLoader ( ) ;
95- placeOrderAction ( self . getData ( ) , new Messages ( ) )
96- . fail ( function ( response ) {
97- self . handleFailedResponse ( response )
98- } )
99- . done ( function ( orderId ) {
100- let posPaymentAction = window . checkoutConfig . payment . adyenPos . paymentAction ;
101- if ( posPaymentAction === 'order' ) {
102- adyenPaymentService . posPayment ( orderId )
103- . fail ( function ( response ) {
104- self . handleFailedResponse ( response )
105- } )
106- . done ( function ( ) {
107- self . posComplete ( )
108- } ) ;
109- } else {
110- self . posComplete ( ) ;
111- }
112- } )
94+
95+ if ( additionalValidators . validate ( ) ) {
96+ fullScreenLoader . startLoader ( ) ;
97+ placeOrderAction ( self . getData ( ) , new Messages ( ) )
98+ . fail ( function ( response ) {
99+ self . handleFailedResponse ( response )
100+ } )
101+ . done ( function ( orderId ) {
102+ let posPaymentAction = window . checkoutConfig . payment . adyenPos . paymentAction ;
103+ if ( posPaymentAction === 'order' ) {
104+ adyenPaymentService . posPayment ( orderId )
105+ . fail ( function ( response ) {
106+ self . handleFailedResponse ( response )
107+ } )
108+ . done ( function ( ) {
109+ self . posComplete ( )
110+ } ) ;
111+ } else {
112+ self . posComplete ( ) ;
113+ }
114+ } )
115+ } else {
116+ return false ;
117+ }
113118 } ,
114119 handleFailedResponse : function ( response ) {
115120 let self = this ;
You can’t perform that action at this time.
0 commit comments