Integrating RBS WorldPay XML Direct Method with PHP

RBS WorldPay Integration With PHP

RBS Worldpay XML Direct model enables you to capture payment details on your own secure server and send the captured data to WorldPay for processing in preference to using WorldPay’s hosted payment pages. This connection model provides you with complete control over the look-and-feel of the payment experience for your customers.

This model supports cardholder authentication, so using it you can comply with MasterCard’s mandate that all Maestro payments are processed using MasterCard’s SecureCode security protocol – the legacy ‘invisible’ connection method still used by some of our customers cannot support this.

Unfortunately, you can’t simply test this unless your server is scanned by RBS and you make your site PCI compliant. While working for one of our customer i indulged into RBS worldpay payment gateway and found it too complex to start with but with time things started looking good.

Basically i was never so dependent on PEAR simply because many of my customers run their sites on shared server where we don’t have access to PEAR libraries often. In this particular case i had to use PEAR to make HTTP_REQUESTS.

Steps to connect to RBS Worldpay

1. RBS Worldpay access only HTTP_REQUESTS from an authenticated servers only so make sure you are posting HTTP_REQUEST from a PCI compliant server.
2. Make sure you have PEAR installed on your server with support to Net libraries containing two main files “Socket.php” and “URL.php”.
3. Now make a folder called HTTP and place the following code in Request.php file, so it looks like “HTTP/Request.php”

Now, we should create a test order which will be posted to RBS Worldpay server for authentication and processing payment.

The above code will authenticate, and process the payment in backend. I will write how to recieve payment notifications and responses in my other post.

0 I like it
0 I don't like it