This repository contains the PHP code for integrating Paytm Payment Gateway into a web application. The integration allows for initiating transactions, checking their status, and handling the response from Paytm after the transaction is processed.
- PHP: Server-side scripting language used for backend logic.
- HTML: Used for structuring the web pages.
- Paytm Payment Gateway API: For handling payments.
This is the initial page where the user inputs transaction details such as order ID, customer ID, industry type, channel, and transaction amount.
- Order ID: Generated dynamically for each transaction.
- Customer ID: Predefined as 'CUST001'.
- Industry Type ID: Set as 'Retail'.
- Channel: Set as 'WEB'.
- Transaction Amount: User input.
This page is responsible for sending transaction data to Paytm's server. It generates a checksum hash to ensure data integrity.
- Checksum Generation: For security, a checksum hash is generated and sent along with the transaction data.
This page handles the response from Paytm after the transaction processing.
- Checksum Verification: It verifies the checksum received from Paytm.
- Transaction Status: Displays whether the transaction was successful or failed.
This page allows the user to query the status of a transaction by providing the order ID.
- Order ID Input: User can input the order ID to check the transaction status.
- Transaction Status: Shows the detailed status of the transaction.
- Clone the repository to your local server environment.
- Configure the
config_paytm.php
with your Paytm merchant details. - Access
TxnTest.php
to start a new transaction. - Use
TxnStatus.php
to check the status of a transaction.
- Checksum Hash: Ensures that the data sent to and received from Paytm's server is not tampered with.
- HTTPS Protocol: It is recommended to use HTTPS to ensure secure data transmission.
- PHP 7 or higher.
- Paytm Merchant account for API keys and testing.
- Download or clone the repository.
- Place it in your server's document root.
- Configure the Paytm API keys in
config_paytm.php
. - Access the pages via a web browser.
For more details on Paytm's API and parameters, visit Paytm Developer Documentation.
Note: This is a basic implementation and should be used as a starting point. Ensure to follow security best practices for production deployment.