File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Moyasar/Mysr/view/frontend/web/js/view/payment/method-renderer Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -164,22 +164,24 @@ define(
164
164
} ) ;
165
165
} ,
166
166
onCompleted : function ( payment ) {
167
+ var self = this ;
168
+
167
169
this . payment = payment ;
168
170
this . updateOrderPayment ( payment )
169
171
. done ( function ( ) {
170
- this . isPlaceOrderActionAllowed ( true ) ;
172
+ self . isPlaceOrderActionAllowed ( true ) ;
171
173
172
- if ( payment . status === 'initiated' ) {
174
+ if ( payment . status == 'initiated' ) {
173
175
fullScreenLoader . stopLoader ( ) ;
174
- this . transactionUrl = payment . source . transaction_url ;
176
+ $ ( '#checkout' ) . trigger ( 'processStop' ) ;
175
177
} else {
176
- this . cancelOrder ( extractApiErrors ( xhr . responseJSON ) ) ;
178
+ self . cancelOrder ( extractApiErrors ( xhr . responseJSON ) ) ;
177
179
}
178
180
} )
179
181
. fail ( function ( xhr ) {
180
182
var errors = extractApiErrors ( xhr . responseJSON ) ;
181
183
errors . push ( mage ( 'Error! Payment failed, please try again later.' ) ) ;
182
- this . cancelOrder ( errors ) ;
184
+ self . cancelOrder ( errors ) ;
183
185
} ) ;
184
186
} ,
185
187
onFailure : function ( errors ) {
You can’t perform that action at this time.
0 commit comments