Created
January 27, 2021 07:53
-
-
Save klondaiker/7d74af0c304f96b26fbc9f445107ac42 to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html><html><head><meta content='text/html; charset=UTF-8' http-equiv='Content-Type'><script src="https://www.merchant.geidea.net/hpp/geideapay.min.js" rel="preload"></script></head><body><script> | |
try { | |
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-459"; | |
} | |
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: 30, | |
currency: "SAR", | |
merchantReferenceId: "459", | |
merchantLogoUrl: "", | |
address: { | |
billing: { | |
country: "", | |
city: "", | |
street: "", | |
postcode: "" | |
}, | |
shipping: { | |
country: "", | |
city: "", | |
street: "", | |
postcode: "" | |
} | |
}, | |
showAddress: false, | |
email: "", | |
showEmail: false, | |
cardOnFile: false, | |
styles: { | |
headerColor: "default", | |
headerProfile: "simple" | |
}, | |
paymentOperation: "Pay" | |
}); | |
api.startPayment(); | |
} catch(err) { | |
alert(err); | |
} | |
</script></body></html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment