Support Services

SWP - Checkout


Secure Web Pay – Checkout

The Checkout option is the most basic integration method and is easiest to implement. It allows a web merchant to call the Payments Gateway hosted payment form for entering and securely submitting transaction information. The merchant can customize the look and feel of the hosted payment form by either selecting a predefined payment form style or passing in configuration fields with the call to the payment form.

 

Request Parameters

Certain parameters are used to populate values on the payment page as read-only. Prefixing a parameter with an “e_” will allow the value to be shown as editable.


The SWP integration guide is available here which details the request parameters and other details.

 

URLs

A date-time value (since 01/01/0001 00:00:00) that marks the day and time the request was sent to Checkout in ticks. Checkout will only accept utc_time values that are 20 minutes before the current time or 10 minutes after the current time. Requests expire after 10 minutes to prevent malicious users from capturing requests and resubmitting them at a later time.

Checkout provides an API that returns the correct UTC time from Forte’s server. Using this server-side value prevents inadvertent expiration errors from client PCs that do not have the correct local time set.

Use the following getUTC API URLs in your code to retrieve UTC ticks from Forte's servers:

  • https://checkout.forte.net/getUTC?callback=? //production

  • https://sandbox.forte.net/checkout/getUTC?callback=? //sandbox

The following script returns the correct UTC time for the hash:

<script>  var button = $('button[api_access_id]');  $.getJSON('https://sandbox.forte.net/checkout/getUTC?callback=?').done(function (utc) {  button.attr('utc_time', utc);  });  </script>
JavaScript

You can also use the following PHP/Curl code sample to fetch the UTC time from the getUTC API URL displayed above (e.g., ?(XXXXXXXXXXXX643793); where XXXXXXXXXXXX643793 is the UTC time value).

<?php
    function utc() {
        $curlUTC = curl_init();
        curl_setopt($curlUTC, CURLOPT_URL, 'https://checkout.forte.net/getUTC?callback=?');
        curl_setopt($curlUTC, CURLOPT_BINARYTRANSFER, true);
        curl_setopt($curlUTC, CURLOPT_RETURNTRANSFER, true);
         $curlData = (curl_exec($curlUTC));
        $positionOfOpeningParenthesis = stripos($curlData,"(");
        $positionOfClosingParenthesis = stripos($curlData,")");
        $utc =  substr($curlData,$positionOfOpeningParenthesis+1,$positionOfClosingParenthesis-2);
        return $utc;
        curl_close($curlUTC);
    }

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.