Skip to content

Commit

Permalink
Remove ajax redirect and Handling on error to cancel page
Browse files Browse the repository at this point in the history
  • Loading branch information
Xaxxis committed Dec 17, 2019
1 parent a32ecd2 commit 8e3e119
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,22 +176,13 @@ define(
messageList.addErrorMessage({
message: result.status_message
});
window.location.replace(url.build('checkout/onepage/failure'));
window.location.replace(url.build('snap/payment/cancel'));
console.log(result.status_message);
},
onClose: function () {
console.log("get to onclose")
trackResult(data, merchant_id, 'Fullpayment Snap PopUp', 'close');
$.ajax({
url: url.build('snap/payment/cancel'),
cache: false,
success: function () {
messageList.addErrorMessage({
message: 'customer closed the popup without finishing the payment'
});
console.log('customer closed the popup without finishing the payment');
}
});
window.location.replace(url.build('snap/payment/cancel'));
}
});
var snapExecuted = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,22 +176,13 @@ define(
messageList.addErrorMessage({
message: result.status_message
});
window.location.replace(url.build('checkout/onepage/failure'));
window.location.replace(url.build('snap/payment/cancel'));
console.log(result.status_message);
},
onClose: function () {
console.log("get to onclose")
trackResult(data, merchant_id, 'Installment_Dragon Snap inst PopUp', 'close');
$.ajax({
url: url.build('snap/payment/cancel'),
cache: false,
success: function () {
messageList.addErrorMessage({
message: 'customer closed the popup without finishing the payment'
});
console.log('customer closed the popup without finishing the payment');
}
});
window.location.replace(url.build('snap/payment/cancel'));
}
});
var snapExecuted = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,22 +175,13 @@ define(
messageList.addErrorMessage({
message: result.status_message
});
window.location.replace(url.build('checkout/onepage/failure'));
window.location.replace(url.build('snap/payment/cancel'));
console.log(result.status_message);
},
onClose: function () {
console.log("get to onclose")
trackResult(data, merchant_id, 'Installment_Offline Snap PopUp', 'close');
$.ajax({
url: url.build('snap/payment/cancel'),
cache: false,
success: function () {
messageList.addErrorMessage({
message: 'customer closed the popup without finishing the payment'
});
console.log('customer closed the popup without finishing the payment');
}
});
window.location.replace(url.build('snap/payment/cancel'));
}
});
var snapExecuted = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,22 +177,13 @@ define(
messageList.addErrorMessage({
message: result.status_message
});
window.location.replace(url.build('checkout/onepage/failure'));
window.location.replace(url.build('snap/payment/cancel'));
console.log(result.status_message);
},
onClose: function () {
console.log("get to onclose")
trackResult(data, merchant_id, 'Fullpayment Snap Specific PopUp', 'close');
$.ajax({
url: url.build('snap/payment/cancel'),
cache: false,
success: function () {
messageList.addErrorMessage({
message: 'customer closed the popup without finishing the payment'
});
console.log('customer closed the popup without finishing the payment');
}
});
window.location.replace(url.build('snap/payment/cancel'));
}
});
var snapExecuted = true;
Expand Down

0 comments on commit 8e3e119

Please sign in to comment.