Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Before calling the Credit Card Process API , an external API is called on the Blink Platform to tokenise the card details fetched from the hosted card fields and generate a payment Token value. This value will be auto added in the payment form. To achieve this , follow the below steps.


Hosted Fields requires JQuery. The Gateway supports versions 1.8 to 3.6. We use 3.6.3 here:

<script src="https://code.jquery.com/jquery-3.6.3.min.js"></script>

To initialise a Hosted Fields instance, include this JavaScript in your payment page. This script should always be loaded directly from the Blink Gateway.

<script src="https://gateway2.blinkpayment.co.uk/sdk/web/v1/js/hostedfields.min.js"></script>

In addition to that , include this JavaScript to automatically setup the Hosted Form integration.

Please note that an id value is required in this form element to initiate the Hosted Fields js.

This script will automatically append the paymentToken value to the payment form on form submission.

$(function() {
  var formID = $('form').attr('id');
  var $form = $('#'+formID);
  var auto = {
      autoSetup: true,
      autoSubmit: true,
};
try {
  var hf = $form.hostedForm(auto);
} catch(e) {
  //Add your exception handling code here
}
  • No labels