Skip to content

Instantly share code, notes, and snippets.

@klondaiker
Last active January 20, 2021 11:10
Show Gist options
  • Save klondaiker/ab40c01ccffa5a2e996df50eb535b7f5 to your computer and use it in GitHub Desktop.
Save klondaiker/ab40c01ccffa5a2e996df50eb535b7f5 to your computer and use it in GitHub Desktop.
Geidea Payment
var onSuccess = function(_message, _statusCode) {
document.location.href = "https://demo.constructor.avalab.io/payments/geidea_payment/success";
}
var onError = function(errorMessage, errorCode) {
alert(errorCode + ': ' + errorMessage)
}
var onCancel = function() {
document.location.href = "https://demo.constructor.avalab.io/orders/k-2-434";
}
var api = new GeideaApi("1ae97673-bc01-49fa-bfd6-c26abefe0c1d", onSuccess, onError, onCancel);
api.configurePayment({
merchantKey: "1ae97673-bc01-49fa-bfd6-c26abefe0c1d",
callbackUrl: "https://api.constructor.avalab.io/v1/callbacks/geidea_payment/notify",
amount: 1500,
currency: "SAR",
merchantReferenceId: "434"
});
api.startPayment();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment