PHP Payment Gateway Integration
PHP Payment Gateway Integration
0 PayZone UK
Monday, 17 July 2017
Module / Plugin
We have a library of plugins & modules for inclusion in the leading e-commerce / shopping
cart platforms. These modules include the integration methods below.
Difficulty: Very easy - This integration method is the easiest to implement, as the plugin /
module just needs installing and setting up with your details.
Page !1 of 5
!
Version 2.2.0 PayZone UK
Monday, 17 July 2017
support the Direct/API integration method, merchants who cannot host secure (HTTPS)
pages or merchants who would like to completely outsource the payment process of their
website – usually for PCI compliance reasons. Please review the Result Delivery Methods
section below for information on the different result delivery methods.
Difficulty: Easy - This integration uses the users browser as a data relay, for the payment
request. There are some additional steps required to securely transmit the data to/from the
payment gateway, as well as handling the response.
Direct/API Integration
Direct/API processing allows merchants to keep their customers on their site throughout the
entire checkout process. This provides a much smoother checkout experience, and keeps the
details of the underlying payment processor completely hidden from the customers. The API
for this method exposes the full functionality of the payment system. This method requires
the merchant’s system to be able to serve out HTTPS pages, which will require them to have
an SSL certificate.
Transparent Redirect
The Transparent Redirect method allows the merchant’s system to appear to keep the
customer on their own system during the checkout process, but the card details don’t
actually touch the merchant’s system – they get posted directly across to the payment
system. This approximates the appearance and experience of the Direct/API method, but it
has the same compliancy requirements as the Hosted Payment Form method.
This method requires the merchant’s system to be able to serve out HTTPS pages, which will
require them to have an SSL certificate.
Difficulty: Hard - This integration uses the users browser as a data relay, there are some
additional steps required to securely transmit the data to/from the payment gateway, as well
as handling the response. These additional steps add complexity to the integration.
All of the above methods demonstrate how to post the transactional data across to the
payment page in a secure manner. The transaction data MUST be protected as it is being
delivered to the payment form via the customer's browser. The data is protected by the use
of Hashing. Hashing is used to produce a unique "signature" for the data being passed (it is
generated using not only the data being transmitted, but also secret data that is not
transmitted, so the fraudster cannot recreate the hash digest with the data that is passed via
their browser). The hash signature is then re-calculated on receipt of the transmitted data,
and if it does not match the hash signature that was transmitted with the data, then the data
has been tampered with, and the transaction will stop with an error message. The same
process (in reverse) should be carried out by this site on receipt of the transaction results.
The worst kinds of customer tampering could be lowering the transaction price (say from
£100.00 down to £1.00), or making a failed transaction look like an authorised one. This is
called a "man-in-the- middle" attack.
Page !2 of 5
!
Version 2.2.0 PayZone UK
Monday, 17 July 2017
POST
Choosing the POST method will deliver the full results via the customer's browser as a form
post back to the CallbackURL. This is usually the least difficult method to implement. The
downside is, if the CallbackURL does not begin with HTTPS (notice the significance of the S),
then the connection is not secure. If that is the case, most modern browsers throw a security
warning to the customer explaining that sensitive information is being passed over to an
insecure connection. We do not send sensitive information back, but the browsers are trying
to safeguard the customer. As a result, we show the customer a dialog informing them of the
reason why they are about to see a security warning and how to handle it.
The next two Server Result Methods exchange the transaction results directing with the
merchants system and the payment page (removing the customer’s browser from the
process).
SERVER
When chosen, the results are PUSHED TO the ServerResultURL on the merchant's website
BEFORE the customer is redirected back to the merchant’s site. This has the advantage of
getting around the modern security warning if the merchant is not using HTTPS (Secure
Connection). The downside is, this is probably the hardest of the methods to implement.
SERVER_PULL
When chosen, the results are PULLED FROM the payment form by the merchant's system
AFTER the customer has been redirected back to the website. This has the advantage of
getting around the modern security warning if you’re not using HTTPS (Secure Connection).
Its downside, it is not necessarily the easiest of the methods to implement.
Please note: Each gateway account has a separate password and will need to be reset
individually.
Page !3 of 5
!
Version 2.2.0 PayZone UK
Monday, 17 July 2017
Please note: These emails will be delivered in addition to any emails generated by your
shopping cart / e-commerce site.
• Merchant ID
• Merchant password
• Pre shared key
• Hash method
• Merchant ID
• Merchant password
• Pre shared key
• Hash method
• 0 - Payment successful
• 3 - 3D secure authentication requested
• 4 - Payment referred
• 5 - Payment rejected
• 20 - Duplicate Transaction identified
• 30 - Unknown error occurred
Page !4 of 5
!
Version 2.2.0 PayZone UK
Monday, 17 July 2017
When sending the payment I get a “form was not skinned” error?
Check the Merchant ID has been entered correctly.
• Merchant ID
• Merchant password
• Pre shared key
• Hash method
Page !5 of 5
!