2017 © Pedro Peláez
 

library paytm-payment

Payment Integration with Paytm.

image

princealikhan/paytm-payment

Payment Integration with Paytm.

  • Monday, April 24, 2017
  • by princealikhan
  • Repository
  • 1 Watchers
  • 3 Stars
  • 520 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 2 Open issues
  • 11 Versions
  • 5 % Grown

The README.md

Paytm Payment Library For Laravel 5

Introduction

It simplifies the payment flow with the defined methods. You can pay through paytm just writing few lines of codes. Before you start installing this service, please complete your Paytem setup at on Paytm., (*1)

Installation

First, you'll need to require the package with Composer:, (*2)

composer require princealikhan/paytm-payment

Aftwards, run composer update from your command line., (*3)

Then, update config/app.php by adding an entry for the service provider., (*4)

'providers' => [
    // ...
    'Princealikhan\PaytmPayment\PaytmServiceProvider',
];

Then, register class alias by adding an entry in aliases section, (*5)

'aliases' => [
    // ...
    'Paytm' => 'Princealikhan\PaytmPayment\Facades\Paytm',
];

Finally, from the command line again, run php artisan vendor:publish to publish the default configuration file. This will publish a configuration file named paytm.php which includes your Paytm authorization keys and aditional settings., (*6)

Configuration

You need to fill in paytm.php file that is found in your applications config directory., (*7)

Usage

Request for Payment

You can easily send a message to all registered users with the command, (*8)

$request = array('CUST_ID' => 1 ,'TXN_AMOUNT'=> 1 );
Paytm::pay($request);

CUST_ID and TXN_AMOUNT fields value are pass to Paytm and redirect to callback URL., (*9)

After redirect to callback URL

Once we redirected to callback URL we need to verify whether transaction Success or Fail., (*10)

Example

Suppose, your callback URL is https://your-app.io/payment/callback Paytm POST respone on your URL. we need to get response., (*11)

In routes.php add a post method., (*12)

Route::post("payment/callback", "PaymentController@callback");

In PaymentController create a method, (*13)

public function callback(Request $Request)
{
$paymentResponse =  $Request->all();
$paymentData     = Paytm::verifyPayment($paymentResponse);
}

$postData gives transcation details. after, use your business logic to save., (*14)

Check Transaction Status

Paytm::transactionStatus($orderID);

$orderID is the Unique ID generated for the transaction by merchant, (*15)

Initiate Refund Process

Paytm::initiateTransactionRefund($orderID,$amount,$txnType);

$orderID: Transaction Order Id by merchant., (*16)

$amount: Amount to refund., (*17)

$txnType; Any one of below values: REFUND CANCEL, (*18)

Please refer to Documentation. for all customizable parameters., (*19)

The Versions

24/04 2017

dev-master

9999999-dev

Payment Integration with Paytm.

  Sources   Download

MIT

The Requires

 

by Prince Ali Khan

laravel payment gateway india paytm

24/04 2017

v1.0.8

1.0.8.0

Payment Integration with Paytm.

  Sources   Download

MIT

The Requires

 

by Prince Ali Khan

laravel payment gateway india paytm

16/11 2016

v1.0.6

1.0.6.0

Payment Integration with Paytm.

  Sources   Download

MIT

The Requires

 

by Prince Ali Khan

laravel payment gateway india paytm

16/11 2016

dev-develop

dev-develop

Payment Integration with Paytm.

  Sources   Download

MIT

The Requires

 

by Prince Ali Khan

laravel payment gateway india paytm

22/10 2016

v1.0.5

1.0.5.0

Payment Integration with Paytm.

  Sources   Download

MIT

The Requires

 

by Prince Ali Khan

laravel paytm

15/10 2016

v1.0.4

1.0.4.0

Payment Integration with Paytm.

  Sources   Download

MIT

The Requires

 

by Prince Ali Khan

laravel paytm

08/10 2016

v1.0.3

1.0.3.0

Payment Integration with Paytm.

  Sources   Download

MIT

The Requires

 

by Prince Ali Khan

laravel paytm

08/10 2016

v1.0.2

1.0.2.0

Payment Integration with Paytm.

  Sources   Download

MIT

The Requires

 

by Prince Ali Khan

laravel paytm

08/10 2016

v1.0.1

1.0.1.0

Payment Integration with Paytm.

  Sources   Download

MIT

The Requires

 

by Prince Ali Khan

06/10 2016

v1.0

1.0.0.0

Payment Integration with Paytm.

  Sources   Download

MIT

The Requires

 

by Prince Ali Khan

06/10 2016

v0.0.1

0.0.1.0

Payment Integration with Paytm.

  Sources   Download

MIT

by Prince Ali Khan