📜  anandsiddharth laravel-paytm-wallet for laravel 7 github - Shell-Bash (1)

📅  最后修改于: 2023-12-03 14:39:06.749000             🧑  作者: Mango

Laravel Paytm Wallet for Laravel 7

GitHub Repository: anandsiddharth/laravel-paytm-wallet

Introduction

Laravel Paytm Wallet is a Laravel package that provides an easy interface to integrate Paytm wallet with your Laravel applications. This package uses Paytm's PHP SDK to provide seamless integration with Paytm wallet. It provides a set of convenient methods to handle wallet transactions, refunds, and status checks.

Features
  • Easy integration with Paytm wallet
  • Convenient methods to handle wallet transactions, refunds, and status checks
  • Configurable Paytm environment (Production, Staging, or Sandbox)
  • Extensively tested with Laravel 7
  • Secure and reliable
Installation

To get started with Laravel Paytm Wallet, install the package through Composer:

composer require anandsiddharth/laravel-paytm-wallet

Please follow the instructions mentioned in the official documentation to complete the setup process.

Example

Here's an example of how you can use Laravel Paytm Wallet in your Laravel application:

// Load the Paytm Wallet facade
use Anand\LaravelPaytmWallet\Facades\PaytmWallet;

// Initiate a transaction
$transaction = PaytmWallet::with('receive');

// Setup transaction details
$transaction->prepare([
    'order' => 'ORDER123',
    'amount' => 100,
]);

// Handle the response
$response = $transaction->receive();
if ($response['STATUS'] === 'TXN_SUCCESS') {
    // Transaction successful, update database with the transaction details
    $transactionId = $response['TXNID'];
    //...
} else {
    // Transaction failed, handle error
    $errorMessage = $response['RESPMSG'];
    //...
}
Conclusion

Laravel Paytm Wallet is a great package that makes it easy to integrate Paytm wallet with your Laravel applications. It provides a clean API with easy-to-use methods to handle wallet transactions, refunds, and status checks. The package is extensively tested and is reliable, making it a great choice for integrating Paytm wallet with your Laravel application.