I have Implemented a Hosted Checkout Integration using this documentation here
And getting success session id as
{ "merchant": "MY_MERCHANT_ID", "result": "SUCCESS", "session": { "id": "SESSION0002278023569L98575562J6", "updateStatus": "SUCCESS", "version": "207d5765v" }, "successIndicator": "6d8798fb3573fgb5" }
When I have passed this session id stored in a variable $sessionId to checkout configure I got error in console "cause":"INVALID_REQUEST","explanation":"Form Session not found or expired".
Here is my checkout.configure
<html> <head> <script src="https://credimax.gateway.mastercard.com/checkout/version/54/checkout.js" data-error="errorCallback" data-cancel="cancelCallback"></script> <script type="text/javascript"> function errorCallback(error) { console.log(JSON.stringify(error)); } function cancelCallback() { console.log('Payment cancelled'); } Checkout.configure({ merchant: 'MY_MERCHANT_ID', order: { amount: function() { return 0.010; // Transaction Amount }, currency: 'BHD', description: 'Test', id: '1435345' //Pass new order id }, session: { id : '<?php echo $sessionId; ?>' // PASS the session id generated in the api --> --> }, interaction: { operation: 'AUTHORIZE', merchant: { name: 'My Company', logo: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png' }, displayControl: { billingAddress : "HIDE" }, } }); </script> </script> </head> <body><br> <input type="button" value="Pay with Light Box" onclick="Checkout.showLightbox();" /> <input type="button" value="Pay with Payment Page" onclick="Checkout.showPaymentPage();" /> </body>
Any one had same experience? Any help coders???
https://stackoverflow.com/questions/66085004/causeinvalid-request-explanationform-session-not-found-or-expired-in-mas February 07, 2021 at 02:00PM
没有评论:
发表评论