Contents

Install a library

We provide libraries for the Python and PHP programming languages. Alternatively, it is possible to use cURL in a variety of other languages. These libraries consist of functions that can be referenced within your program body without defining them explicitly.

We recommend that you follow the instructions below to download and install your preferred library on your server.

Planning on using your own library?

If you plan on using your own library to process requests, you will need to read “Configuring your own library” and then proceed to step 2.

 

Python

Info
  • We support Python 2 and 3.
  • Python 2 users are recommended to use Python 2.7.9 or higher. Any version prior to 2.7.9 may return an SNI warning when the library is instantiated.
  • Version “2.9” of the Python “requests” library is required to ensure that the latest certificates have been installed.

To install our Python library, you can use pip, which is a package management system used to install and manage software packages written in Python.


pip install securetrading

Alternatively, you can download the package from https://github.com/Secure-Trading/st-python-api and install the library manually.

 

PHP

You can use the following command to install our PHP library.

Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will install and update them for you.


composer require securetrading/stpp_json

 

cURL

No library installation is required when using cURL.

 

Padlock
You must never log sensitive payment details on your server

Please ensure that any additional debugging enabled whilst testing your integration is disabled prior to going live. Failing to do so may contravene the requirements needed to maintain PCI compliance.

Status good
Summary

You have now installed a library on your server, and you can use this to send requests to our gateway. But first, you will need to update your server-side payment form.

Please proceed to step 2 to learn more.