Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Credit Card Payment Questions


Recommended Posts

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>
    <!-- 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"/>
    <script src="https://api.payway.com.au/rest/v1/payway.js">
    <script type="text/javascript">
      var submit = document.getElementById('payway-cc-submit');
          publishableApiKey: '{publishableApiKey}',
          onValid: function() { submit.disabled = false; },
          onInvalid: function() { submit.disabled = true; }

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


This topic is now archived and is closed to further replies.

  • Create New...