📅  最后修改于: 2023-12-03 14:39:06.749000             🧑  作者: Mango
GitHub Repository: anandsiddharth/laravel-paytm-wallet
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.
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.
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'];
//...
}
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.