Advanced Pay Button Integration
Pay By Link Articles
The advanced integration method requires knowledge of server-side scripting languages, such as PHP, ASP, Java, etc.
It will allow you to have full control over what information is passed to our gateway via the Pay Button and use the full list of hosted integration fields outlined in our Hosted Guide.
Pre-Requisites
|
Merchant ID |
Your Merchant ID enables you to access and communicate with the payment gateway. Please note that these details will differ to the login supplied to access the administration panel. You should have received these details when your account was set up. NB: You can also enter “TEST” as the Merchant ID to test the system. This allows prospective customers to test the integration prior to signing up for an account. |
|
Integration URL |
«Gateway_URL»button/?fields={BASE 64 ENCODED STRING} |
|
Signature |
Provided with account setup details. |
Gateway Request
To create the button the details should be URL encoded Name=Value fields separated by ‘&’ characters (refer to RFC 1738 and the application/x-wwwform-urlencoded media type).
This is then base64 encoded with all padding characters (=) stripped and the following characters +, / replaced with – and _ respectively.
This string is then appended to the gateway URL via a GET parameter called fields to give the final link replacing the {base 64 encoded string} above.
Mandatory Request Fields
The below fields MUST be sent to the gateway via the advanced method.
|
Field Name |
Mandatory |
Description |
|---|---|---|
|
merchantID |
yes |
The six-digit id provided to you during set-up, e.g. 123456. For testing, please use ‘TEST’. |
|
amount |
yes |
The amount of the transaction in minor currency. For the UK this is in pence, e.g. £10.99 is sent as 1099. Numeric values only – no decimal points or currency symbols. |
|
action |
yes |
The action of the transaction. Values are: |
|
type |
yes |
The type of transaction. Passed as a single digit. Possible values are: |
|
redirectURL |
yes |
The URL to which the customer will be redirected after the transaction with the transaction result sent via POST. We recommend the integration also contain a callbackURL to ensure the transaction details are sent to the website in case the cardholder’s browser fails to redirect them. |
|
countryCode |
yes |
Merchant's Location. Valid ISO-3166 alpha or numeric code, e.g. 826 for U.K. |
|
currencyCode |
yes |
Transaction Currency. Valid ISO-3166 alpha or numeric code, e.g. 826 for U.K. |
|
signature |
yes |
A hashed string of the request containing the signature key unique to the merchant ID. More details on message signing can be found in our core API guide. |
Optional Request Fields
The below Pay Button fields are optional and do NOT have to be sent in the request.
|
Field Name |
Mandatory |
Description |
|---|---|---|
|
redirectURLFail |
no |
The URL to which the customer will be redirected and the transaction result will be POSTed if the transaction fails. If left blank, the redirectURL will be used. |
|
formAmountEditable |
no |
Accepts the following value: ‘Y’ – Allows the cardholder to enter the amount to pay in the hosted form and is useful for donations. Note: Passing ‘N’, or null to this field causes the amount in the hosted form to act as default, i.e. A static value the user can’t change. |