Portman Posted April 28, 2019 Share Posted April 28, 2019 Hi I am trying to implement a new credit card payment solution that seems really simple but I am not sure how to do it... Basically I have been provided with a snippet of code that references the banks payment gateway and generates a credit card form on my page. Apparently all i need to do is add my API key and it all works fine... So my question is how do i implement this as a module for BS frozen? this is the code I need to add ... <!DOCTYPE html> <html> <body> <!-- this form will POST a single use token to your server --> <form action="/process-payment" method="post"> <div id="payway-credit-card"></div> <input id="payway-cc-submit" type="submit" disabled="true"/> </form> <script src="https://api.payway.com.au/rest/v1/payway.js"> </script> <script type="text/javascript"> var submit = document.getElementById('payway-cc-submit'); payway.createCreditCardFrame({ publishableApiKey: '{publishableApiKey}', onValid: function() { submit.disabled = false; }, onInvalid: function() { submit.disabled = true; } }); </script> </body> </html> Apparently once I have got this bit working I can then add other bits and pieces to guard against duplicate transactions and handle errors like no funds, canceled card etc... Can someone suggest how I should implement this? I have never created a module from scratch but I am keen to try, is there an existing module that I can look at as an example and/or modify it for my own purposes?. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted April 28, 2019 Share Posted April 28, 2019 No payment system is simple when you have to intgrate an API. Take a look at an existing moduel to see how it's done, Then I would look at an exsting PayWay add-on and try and update that first as it amy save time. https://apps.oscommerce.com/mHJzv Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.