Last active
January 20, 2021 11:10
-
-
Save klondaiker/ab40c01ccffa5a2e996df50eb535b7f5 to your computer and use it in GitHub Desktop.
Geidea Payment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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