WorldPay Payment Gateway Integration in php |

Congrats, You are Subscribed to Receive Updates.

WorldPay Payment Gateway Integration in php

WorldPay Payment Gateway Integration in php. For Worldpay Payment integration. you need to register and get test accounts to start working with it. For the test Account,you don’t need to submit much things for the proof. You can simply Apply and get its Test Accounts.

Requirements for Testing:

  • WorldPay Account(Test or production ) mode is fine.
  • Installation ID
  • Merchant ID

You can get the installation and Merchant ID’s from the Test Account.

Screenshot 2016-08-10 12:56:22

Now, Let’s begin write the payment form to receive money from users.

<form id="paymentToken" name="paymentToken" method="post" action="">

<input type="hidden" name="instId" value="XXXXXXX"/>
<input type="hidden" name="cartId" value="Kvc-23"/>
<input type="hidden" name="testMode" value="Y"/>
<input type="hidden" name="accId1" value="XXXXXXXX"/>
<input type="hidden" name="currency" value="GBP"/>
<input type="hidden" name="town" value="Town"/>
<input type="hidden" name="authMode" value="A"/>

<input type="hidden" name="MC_ad_id" id="MC_ad_id" value="Custom_Parameter"/>

<input type="hidden" name="amount" value="123.45" />

<input type="hidden" name="desc" value="Test Product Description"/>
<input type="hidden" name="name" value="Test Product Name"/>
<input type="hidden" name="address1" value="Address line 1"/>
<input type="hidden" name="address2" value="Address line 2"/>
<input type="hidden" name="address3" value="Address line 3"/>
<input type="hidden" name="postcode" value="Postcode"/>
<input type="hidden" name="tel" value="123456789"/>
<input type="hidden" name="country" value="GB"/>

<input type="submit" class="payButton"  value="Process Payment"/></div>

This form will take you to test payment page. Here you can use either test accounts and card details,you can pay for it, Usually I Prefer to go with “Master Card and ” 5555555555554444″ is card no and expiry date is also your desired one.

Custom Parameter:

Here `MC_ad_id` is my custom parameter,you can pass all your custom parameters with help of `MC_`.

WorldPay URL :

For the testing site and production site. You have to use the following url

When your site comes to live, you can use the below one.

That’s it. It will help you to create your WorldPay gate on your site.

Return URL:

The return url ,you have to specify in the worldpay installation page. and also you can activate mobile view as well.



About Varadharaj V

The founder of Kvcodes, Varadharaj V is an ERP Analyst and a Web developer specializing in WordPress(WP), WP Theme development, WP Plugin development, Frontaccounting(FA), Sales, Purchases, Inventory, Ledgers, Payroll & HRM, CRM, FA Core Customization, PHP and Data Analyst. Database Management Advance Level


  1. commenter


    How can I do worldpay Merchant account setting in php.
    please give me a guide line and codes.



    • commenter

      Its very simple compare with Other Gateways. Get them to provide you the details of merchant account and use the tutorial to build payment page. On your merchant account settings page. You have option to retrieve the details like payment notification to your site. Else with the return url you can get and proceed further.

Comment Below

Your email address will not be published. Required fields are marked *


Current ye@r *