Download the PHP package aotearoait/laravel-paytm-wallet without Composer
On this page you can find all versions of the php package aotearoait/laravel-paytm-wallet. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download aotearoait/laravel-paytm-wallet
More information about aotearoait/laravel-paytm-wallet
Files in aotearoait/laravel-paytm-wallet
Package laravel-paytm-wallet
Short Description Integrate paytm wallet easily with this package. This package uses official Paytm PHP SDK's and includes Subscription Service
License MIT
Informations about the package laravel-paytm-wallet
Laravel Paytm Wallet With Scheduled Payment Option
For Laravel 5.0 and above
Introduction
This branch has been privaltely modified to allow scheduled transactions. This can not be done unless PayTM approve a Scheduled Payment Account which is not part of their normal accounts. Integrate paytm wallet in your laravel application easily with this package. This package uses official Paytm PHP SDK's.
License
Laravel Paytm Wallet open-sourced software licensed under the MIT license
Getting Started
To get started add the following package to your composer.json
file using this command.
composer require aotearoait/laravel-paytm-wallet
Configuring
Note: For Laravel 5.5 and above auto-discovery takes care of below configuration.
When composer installs Laravel Paytm Wallet library successfully, register the Anand\LaravelPaytmWallet\PaytmWalletServiceProvider
in your config/app.php
configuration file.
Also, add the PaytmWallet
facade to the aliases
array in your app
configuration file:
One more step to go....
On your config/services.php
add the following configuration
Note : All the credentials mentioned are provided by Paytm after signing up as merchant.
Usage
Making a transaction
Make sure the callback_url
you have mentioned while receiving payment is post
on your routes.php
file, Example see below:
Important: The callback_url
must not be csrf protected Check out here to how to do that
Get transaction status/information using order id
Initiating Refunds
Check Refund Status
Customizing transaction being processed page
Considering the modern app user interfaces, default "transaction being processed page" is too dull which comes with this package. If you would like to modify this, you have the option to do so. Here's how:
You just need to change 1 line in you OrderController
's code.
Here $payment->receive()
is replaced with $payment->view('your_custom_view')->receive()
. Replace your_custom_view
with your view name which resides in your resources/views/your_custom_view.blade.php
.
And in your view file make sure you have added this line of code before </body>
(i.e. before closing body tag), which redirects to payment gateway.
@yield('payment_redirect')
Here's a sample custom view:
That's all folks!