Payment form using PayUmoney payment Gateway in PHP | Source Scripts

In this PHP module, we are going to integrate an online payment form using the Payumoney payment gateway in PHP. Payumoney is a payment gateway for Indian payments. Now, Payumoney is also supporting international payments. In this payment form, we have designed the Payumoney payment gateway.  This web application module is created for Indian Rupees ( INR) currency. You can receive payments from customers and clients.

  This PHP module is developed with all functionality and features. If you want to integrate the best payment gateway and want to receive payments online, then you should use this PHP module.

You can use this PHP module to get donations from your website, payments from your customers, payments from your clients and share payment form link. Yes, you can use this form for donations and support. This is simple and easy to customize. The codes are written with PHP programming and designed by the HTML and CSS. We have created two tables. The first table handles the Payumoney configuration details and the second table handles the payment data. You can use that data anywhere on the website.

This is designed for Indian payments only. Customers and clients enter the amount, about the payment, first name, last name, and phone number. These are the mandatory fields of the Payumoney payment gateway.


Feature of Online payment form using Payumoney payment gateway with PHP –

In the approaches above, We have discussed the various features and advantaged of this PHP module. Now, we will discuss the features and advantages of the Payumoney payment form in deep.


1. Payumoney Payment form –

Payment form

The Payumoney payment form helps to get information from the users (Customers and clients ). A user can enter the amount and other details in this payment form. The payment form is designed with attractive CSS. This looks the same as a professional payment form. In this form, we can add many fields using PHP. You can integrate the Payumoney payment gateway with this PHP and HTML form. This is another simple way to integrate the Payumoney payment gateway into the website. A user enters the payment amount and other details and process to pay using the Payumoney payment gateway.


2.Online payment process by Payumoney website


Payment goes to the Payumoney website and users can pay using a credit card, debit card, banks, wallets (Paytm, phonepe , airtel, ola money,oxigen, etc)  and UPI. Payer gets all payment options on the Payumoney website. The user completes the payment and the money goes to the merchant account. This is the main process of the Payumoney payment gateway integration with PHP and MYSQL database. Payment data stores in the payment table of the MYSQL database.

3. Payment Success Page –

Payumoney payment gateway integration with PHP

The success page is known as the Payumoney payment success page. When a user completes the payment then redirects to the success page. User can check payment details on the success page. This is created on the merchant website.  The customer or client (user) can download the invoice in PDF and excel format. The success page is designed with CSS and functional by the PHP, We fetch and display the data from the payment table.  This is another best feature of this PHP module that we can check payment details and can download the payment invoice in PDF and Excel file.

`id` int(50) NOT NULL,
  `status` varchar(255) NOT NULL,
  `firstname` varchar(255) NOT NULL,
  `lastname` varchar(255) NOT NULL,
  `amount` varchar(255) NOT NULL,
  `txnid` varchar(255) NOT NULL,
  `posted_hash` varchar(255) NOT NULL,
  `key_value` varchar(255) NOT NULL,
  `productinfo` varchar(255) NOT NULL,
  `payer_email` varchar(255) NOT NULL,
  `item_number` int(255) NOT NULL,
  `date` datetime NOT NULL,
  `reference_no` varchar(255) NOT NULL,
  `currency` varchar(50) NOT NULL,

4. Download Invoice in PDF –

Generating PDF using PHP and MYSQL database | Payment form invoice

This is the process of generating PDFs in PHP with an MYSQL database. We generate the PDF after fetching the data from the database. Users can download the invoice and save for future reference. This is the best feature of this PHP module.

5. Download Invoice in Excel –

Import Excel using PHP and MYSQL database | Payment form invoice

This is another feature to download the invoice in excel format. This is the process of fetching data from the database and export into excel format. 

6. All Payments page

Payumoney payment gateway in PHP

This is another feature of integrating the Payumoney payment gateway in PHP. All successful payment data is fetched from the database and displayed on this page so that the merchant can see how many payments have been made

7. Email notification –

Email template in PHP

Email notification is done by the PHP mail() function. User receives an email after payment. Email contains details related to the payment. This is designed by the CSS and functional by the PHP programming.User pays the money and receives the email notification. This is the best feature of this the Payumoney payment form integration with PHP.

8. Payumoney Configuration form –

Payumoney payment gateway integration in PHP | Payumoney Configration form

This is really complex if you do with the PHP code but here, we designed a simple setup form and database table. A merchant can configure the Payumoney payment gateway using this setup form. It’s really simple to configure. Enter the details like –

Payumoney merchant key – Merchant key from your Payumoney account.

Payumoney Merchant Salt - Merchant salt from your Payumoney account.

Payu Success URL – Payumoney Success page URL in the merchant website

Payu failed URL  - Payumoney failed page URL in the merchant website


Mode – You can set a test or live mode.

Web email – Set your email (From email for email notification)

Logo – Logo form email notification

Footer credits – for email notification. 

It’s really easy.

Install payment form and Payumoney payment gateway integration in PHP –

If you want to integrate Payumoney payment gateway in your website, then you have to follow the steps bellow –

1.  Open config.php file and set your local server and live server details. You can use the local server without an email feature because the mail() function does not work on the local server. You can use the live server with email notification. 

2. Open setup form (setup.php ), fill the required details and save. You can set test and live mode here.

3. Open payment form (index.php ) and test your payment form.

4. After the test, you can set live mode from the setup form

Source Version 2
Fixed :- Payment Description
Payu Migrated version