Skip to content

Commit 07705d2

Browse files
committed
Remove loader on STC Pay OTP
1 parent bd5f5fe commit 07705d2

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Moyasar/Mysr/view/frontend/web/js/view/payment/method-renderer/moyasar_online_payment_method.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,22 +164,24 @@ define(
164164
});
165165
},
166166
onCompleted: function (payment) {
167+
var self = this;
168+
167169
this.payment = payment;
168170
this.updateOrderPayment(payment)
169171
.done(function () {
170-
this.isPlaceOrderActionAllowed(true);
172+
self.isPlaceOrderActionAllowed(true);
171173

172-
if (payment.status === 'initiated') {
174+
if (payment.status == 'initiated') {
173175
fullScreenLoader.stopLoader();
174-
this.transactionUrl = payment.source.transaction_url;
176+
$('#checkout').trigger('processStop');
175177
} else {
176-
this.cancelOrder(extractApiErrors(xhr.responseJSON));
178+
self.cancelOrder(extractApiErrors(xhr.responseJSON));
177179
}
178180
})
179181
.fail(function (xhr) {
180182
var errors = extractApiErrors(xhr.responseJSON);
181183
errors.push(mage('Error! Payment failed, please try again later.'));
182-
this.cancelOrder(errors);
184+
self.cancelOrder(errors);
183185
});
184186
},
185187
onFailure: function (errors) {

0 commit comments

Comments
 (0)