Download the PHP package techtailor/laravel-paytm without Composer

On this page you can find all versions of the php package techtailor/laravel-paytm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-paytm

GitHub release GitHub issues Total Downloads

This package provides a simple Laravel wrapper for the Paytm PG (Payment Gateway) to allow you to easily spin up a new laravel app and start accepting UPI, Wallet, Credit/Debit, Net Banking & EMI payments without any hassle. Before getting started, be sure to go through the Paytm documentation to have a better understanding.

Note: You also need to have a valid Paytm Business Merchant Account to start using the Paytm PG (Payment Gatteway)

Installation

You can install the package via composer:

You can publish the config file with:

You must publish the assets file using:

Usage

Before you can start using this package, you must familiarize yourself with the payment workflow for the Paytm PG. Read official documentation here

To give a basic gist, you generate a unique payment token by providing the amount and customer details, then use the txnId and orderId received in the response to initiate the Checkout JS in your front-end.

Setup Environment

Add the following variables to your .env file, or alternatively, you can publish the config file and update it accordingly.

A bit of explainantion -

Step # 1 - Generate a Token

The $response will return an array containing:

Step # 2 - Invoking Payment Page & Collecting Payment

You can read detailed documentation for Paytm Checkout JS here.

Setup Frontend

Start by adding the @paytmScripts tag into the <head> tag of your page. For ex:

Next, to initiate the Checkout Payment Page, you have 2 available methods -

Method # 1

This method will invoke the payment gateway and upon completion, will redirect the user to the callback url set earlier (or in the config file).

To achieve that, you need to call the openJsCheckoutPopup(orderId, txnToken, amount) function and pass it the orderId, txntoken and the amount received in Step # 1.

Upon clicking the Pay Now button, a pop-up for the Paytm PG will open with all the options to make the payment. Once the payment is complete, you will be redirected to the callback_url set in the .env file as PAYTM_CALLBACK_URL.

Method # 2

This method will allow you to handle the response on the same page (and ignore any callback urls set for this transaction). Useful when you want to process transaction without a redirect.

Once you set the redirect flag as false, you can use the paymentCompleted function to excute further queries using the returned data.

Step # 3 - Receiving Response

The response from the Paytm PG (via callback or same page) will provide an array containing the following (for a successful transaction) -

Using the above data, you can update the order details in your database and add the transaction and order id to it and process it accordingly.

Verify Transaction

You can check and verify the status of any transaction using just the OrderId.

The $response will return an array containing:

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

Patym, Paytm PG, Paytm for Business and all related logos are registered trademarks of and belongs to One97 Communications Limited.


All versions of laravel-paytm with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/contracts Version ^9.0
paytm/paytmchecksum Version ^1.1
spatie/laravel-package-tools Version ^1.9.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package techtailor/laravel-paytm contains the following files

Loading the files please wait ....