Hi
I have written simple page for first Lightbox initialization.
<html>
<head>
</head>
<body>
<img alt="Visa Checkout" class="v-button" role="button" src="https://sandbox.secure.checkout.visa.com/wallet-services-web/xo/button.png" />
<script type="text/javascript" src="https://sandbox-assets.secure.checkout.visa.com/checkout-widget/resources/js/integration/v1/sdk.js">
</script>
<script type="text/javascript">
function onVisaCheckoutReady() {
V.init({
"apikey":"<my_API_Key_from_dashboard_and_its_active>",
"externalClientId":"<my_name_from_dashboard_relationships_section>",
"paymentRequest":{
"currencyCode":"UAH",
"orderId":2598355,
"subtotal":1
},
"settings":{
"locale":"uk_UA",
"countryCode":"UA",
"currencyFormat":"### ### ###,## currencyCodeSymbol",
"displayName":"Company Name",
"review":{
"buttonAction":"Continue"
}
}
});
V.on("payment.success", function(payment) {
document.write("payment.success: \n" + JSON.stringify(payment));
});
V.on("payment.cancel", function(payment) {
document.write("payment.cancel: \n" + JSON.stringify(payment));
});
V.on("payment.error", function(payment, error) {
document.write("payment.error: \n" +
JSON.stringify(payment) + "\n" +
JSON.stringify(error));
});
}
</script>
</body>
</html>
So, after page run, Visa button is not shown but shown this meassage:
payment.error: {"vInitRequest":{}} {"code":401,"message":"Invalid API Key"}
Why event "payment.error" is run? Key is correct!!!
Thanks
I've forgotten to say. This request was made from Firefox
Hello,
The format of the onVisaCheckoutReady function is below, using your Outbound and Encryption Keys:
function onVisaCheckoutReady() {
V.init( {
apikey: "<API_Key>",
encryptionKey: "<Shared_Secret>",
"paymentRequest":{
"currencyCode":"USD",
"subtotal":"10.00"
}
});
Hey @Nexus_Software,
Sorry for the delayed response. I'll take a look and get back to you soon.
Hey @Himan,
To follow up, for all self-service merchants, you will need to contact your respective partner for integration assistance or to troubleshoot issues.