riwash/esewa
最新稳定版本:v1.0.0
Composer 安装命令:
composer require riwash/esewa
包简介
This package allow you to integrate esewa payment in your website
README 文档
README
This package allow you to use esewa v2 for payment gateway
Note:Deffine this thing in env file
- ESEWA_ACCESS_TYPE = Live ** select one Live or Test **
- ESEWA_MERCHANT_ID = your secret key
- ESEWA_PROD_CODE = your production code
- ESEWA_SUCCESS_URL = after payment success call back url
- ESEWA_FAIL_URL = if payment is failed call back url
After That
Make Controller
use Riwash\Esewa\RiwashEsewa;
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Riwash\Esewa\RiwashEsewa;
use Illuminate\Support\Facades\Http;
class PaymentTestController extends Controller
{
public function esewa()
{
$tuid = now()->timestamp;
$data = [
"amount" => "100",
"product_delivery_charge" => "0",
"product_service_charge" => "0",
"product_code" => "EPAYTEST",
"tax_amount" => "10",
"total_amount" => "110",
"transaction_uuid" => $tuid
];
$payment = new RiwashEsewa();
return $payment->esewaCheckout($data);
}
public function success(Request $request)
{
//write your after payment success code here
dd($request->all());
}
public function fail(Request $request)
{
// write if payment failed response here
dd($request->all());
}
}
This much If you get any issue or bug then create issue from here https://github.com/riwash/Riwash-Esewa-Payment-gateway-Laravel-Package/issues
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-02-12