How to integrate a payment gateway into our website?

Aishwarya Survase
3 min readApr 11, 2021

--

I have developed my e-commerce website Samarth food website and hosted it via 000webhost recently. To make my website complete I have decided to implement a payment gateway. I have started reading about payment gateway from the internet and decided to implement a payment gateway using PayUmoney. I created an account in PayUmoney and filled in the information like account number, name, mobile number, etc. After creating an account we get the PayUmoney user dashboard.

PayUmoney user dashboard

The next step is to create a button from the dashboard and fill in the information, select the type of button, color for the button, size of a button, item name, price of the item and click on generate button.

Payment button
Generate payment button

After creating the button we get a link when we generate the button. PayUmoney generates a hyperlink for the customer to click on a particular item.

Hyperlink of item

Copy the above code and paste it into your website page where you want to display the button.
I have created the buttons as per my requirement.

Buttons
Hyperlink pasted in webpage

When all set and customers want to order the food they will click on the pay now button and pay for the item they ordered.

Pay now Button

I want to show you how payment is done via PayUmoney. After clicking on the pay now button it will redirect to the payment page of PayUmoney.

Type mobile number
Fill card details

In the above image, we have to provide the mobile number which is linked to your bank account and fill in the card details from which you want to pay, and click on pay now.

Transaction Status

In the above image, the customer canceled the transaction that’s it gives the customer payment details like merchant name, payment ID which is useful for a further refund if any internet issue is there, and amount. This transaction is also saved on the merchant side to track the transaction.

Transaction status at merchant side

We can see in detail also the transactions made and failed.

Customer’s transaction details

PayUmoney provides various features to track the transactions on the merchant site and maintain our website easily.
Even we can download the report of transaction in excel format.

User transaction report

It was an awesome experience to integrate the payment gateway via PayUmoney. You can use other payment gateways at your convenience. This was all about how I integrated the payment gateway.

--

--

Aishwarya Survase

I am a PHP web developer. Interested to share knowledge about it.