allow vendord
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 32s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s

This commit is contained in:
2026-03-30 14:54:57 +07:00
parent 66aed7c4e8
commit b5e3a778ce
21316 changed files with 2777892 additions and 13 deletions

View File

@@ -0,0 +1,45 @@
<?php
namespace Karim007\LaravelBkashTokenize;
use Karim007\LaravelBkashTokenize\Payment\TBPayment;
use Illuminate\Support\ServiceProvider;
use Karim007\LaravelBkashTokenize\Payment\TBRefund;
class BkashTokenizeServiceProvider extends ServiceProvider
{
/**
* Bootstrap services.
*
* @return void
*/
public function boot()
{
$this->publishes([
__DIR__ . "/../config/bkash.php" => config_path("bkash.php")
],'config');
$this->publishes([
__DIR__.'/Controllers/BkashTokenizePaymentController.php' => app_path('Http/Controllers/BkashTokenizePaymentController.php'),
],'controllers');
$this->loadRoutesFrom(__DIR__ . "/routes/bkash_route.php");
$this->loadViewsFrom(__DIR__ . '/Views', 'bkashT');
}
/**
* Register application services
*
* @return void
*/
public function register()
{
$this->mergeConfigFrom(__DIR__ . "/../config/bkash.php", "bkash");
$this->app->bind("tbpayment", function () {
return new TBPayment();
});
$this->app->bind("tbrefund", function () {
return new TBRefund();
});
}
}

View File

@@ -0,0 +1,91 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Karim007\LaravelBkashTokenize\Facade\BkashPaymentTokenize;
use Karim007\LaravelBkashTokenize\Facade\BkashRefundTokenize;
class BkashTokenizePaymentController extends Controller
{
public function index()
{
return view('bkashT::bkash-payment');
}
public function createPayment(Request $request)
{
$inv = uniqid();
$request['intent'] = 'sale';
$request['mode'] = '0011'; //0011 for checkout
$request['payerReference'] = $inv;
$request['currency'] = 'BDT';
$request['amount'] = 10;
$request['merchantInvoiceNumber'] = $inv;
$request['callbackURL'] = config("bkash.callbackURL");;
$request_data_json = json_encode($request->all());
$response = BkashPaymentTokenize::cPayment($request_data_json);
//$response = BkashPaymentTokenize::cPayment($request_data_json,1); //last parameter is your account number for multi account its like, 1,2,3,4,cont..
//store paymentID and your account number for matching in callback request
// dd($response) //if you are using sandbox and not submit info to bkash use it for 1 response
if (isset($response['bkashURL'])) return redirect()->away($response['bkashURL']);
else return redirect()->back()->with('error-alert2', $response['statusMessage']);
}
public function callBack(Request $request)
{
//callback request params
// paymentID=your_payment_id&status=success&apiVersion=1.2.0-beta
//using paymentID find the account number for sending params
if ($request->status == 'success'){
$response = BkashPaymentTokenize::executePayment($request->paymentID);
//$response = BkashPaymentTokenize::executePayment($request->paymentID, 1); //last parameter is your account number for multi account its like, 1,2,3,4,cont..
if (!$response){ //if executePayment payment not found call queryPayment
$response = BkashPaymentTokenize::queryPayment($request->paymentID);
//$response = BkashPaymentTokenize::queryPayment($request->paymentID,1); //last parameter is your account number for multi account its like, 1,2,3,4,cont..
}
if (isset($response['statusCode']) && $response['statusCode'] == "0000" && $response['transactionStatus'] == "Completed") {
/*
* for refund need to store
* paymentID and trxID
* */
return BkashPaymentTokenize::success('Thank you for your payment', $response['trxID']);
}
return BkashPaymentTokenize::failure($response['statusMessage']);
}else if ($request->status == 'cancel'){
return BkashPaymentTokenize::cancel('Your payment is canceled');
}else{
return BkashPaymentTokenize::failure('Your transaction is failed');
}
}
public function searchTnx($trxID)
{
//response
return BkashPaymentTokenize::searchTransaction($trxID);
//return BkashPaymentTokenize::searchTransaction($trxID,1); //last parameter is your account number for multi account its like, 1,2,3,4,cont..
}
public function refund(Request $request)
{
$paymentID='Your payment id';
$trxID='your transaction no';
$amount=5;
$reason='this is test reason';
$sku='abc';
//response
return BkashRefundTokenize::refund($paymentID,$trxID,$amount,$reason,$sku);
//return BkashRefundTokenize::refund($paymentID,$trxID,$amount,$reason,$sku, 1); //last parameter is your account number for multi account its like, 1,2,3,4,cont..
}
public function refundStatus(Request $request)
{
$paymentID='Your payment id';
$trxID='your transaction no';
return BkashRefundTokenize::refundStatus($paymentID,$trxID);
//return BkashRefundTokenize::refundStatus($paymentID,$trxID, 1); //last parameter is your account number for multi account its like, 1,2,3,4,cont..
}
}

View File

@@ -0,0 +1,10 @@
<?php
namespace Karim007\LaravelBkashTokenize\Exception;
use Exception;
class BkashException extends Exception
{
}

View File

@@ -0,0 +1,11 @@
<?php
namespace Karim007\LaravelBkashTokenize\Exception;
use Exception;
class InvalidPrivateKey extends Exception
{
}

View File

@@ -0,0 +1,11 @@
<?php
namespace Karim007\LaravelBkashTokenize\Exception;
use Exception;
class InvalidPublicKey extends Exception
{
}

View File

@@ -0,0 +1,27 @@
<?php
namespace Karim007\LaravelBkashTokenize\Facade;
use Illuminate\Support\Facades\Facade;
/**
* @method static cPayment($request_data_json, $account=1)
* @method static executePayment($paymentID, $account=1)
* @method static queryPayment($paymentID, $account=1)
* @method static refreshToken($refresh_token, $account=1)
* @method static searchTransaction($trxID, $account=1)
* @method static success($message,$transId)
* @method static cancel($message,$transId=null)
* @method static failure($message,$transId=null)
*/
class BkashPaymentTokenize extends Facade
{
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor()
{
return 'tbpayment';
}
}

View File

@@ -0,0 +1,22 @@
<?php
namespace Karim007\LaravelBkashTokenize\Facade;
use Illuminate\Support\Facades\Facade;
/**
* @method static refund($paymentID,$trxID,$amount,$reason=null,$sku=null)
* @method static refundStatus($paymentID,$trxID)
*/
class BkashRefundTokenize extends Facade
{
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor()
{
return 'tbrefund';
}
}

View File

@@ -0,0 +1,48 @@
<?php
namespace Karim007\LaravelBkashTokenize\Payment;
use Karim007\LaravelBkashTokenize\Traits\Helpers;
class TBBaseApi
{
use Helpers;
/**
* @var string $baseUrl
*/
protected $baseUrl;
public function __construct()
{
$this->baseUrl();
}
/**
* bkash Base Url
* if sandbox is true it will be sandbox url otherwise it is host url
*/
private function baseUrl()
{
if (config("bkash.sandbox") == true) {
$this->baseUrl = 'https://tokenized.sandbox.bka.sh/v1.2.0-beta/tokenized';
} else {
$this->baseUrl = 'https://tokenized.pay.bka.sh/v1.2.0-beta/tokenized';
}
}
/**
* bkash Request Headers
*
* @return array
*/
protected function headers()
{
return [
"Content-Type" => "application/json",
"X-KM-IP-V4" => $this->getIp(),
"X-KM-Api-Version" => "v-0.2.0",
"X-KM-Client-Type" => "PC_WEB"
];
}
}

View File

@@ -0,0 +1,72 @@
<?php
namespace Karim007\LaravelBkashTokenize\Payment;
use Karim007\LaravelBkashTokenize\Traits\Helpers;
class TBPayment extends TBBaseApi
{
use Helpers;
public function cPayment($request_data_json, $account=1)
{
if ($account == 1) $account=null;
else $account="_$account";
$response = $this->getToken($account);
if (isset($response['id_token']) && $response['id_token']){
return $this->getUrl('/checkout/create','POST',$request_data_json, $account);
}
return $response;
}
public function executePayment($paymentID, $account=1)
{
if ($account == 1) $account=null;
else $account="_$account";
$token = session()->get('bkash_token');
if (!$token) $this->getToken($account);
return $this->getUrl2($paymentID,'/checkout/execute', $account);
}
public function queryPayment($paymentID, $account=1)
{
if ($account == 1) $account=null;
else $account="_$account";
$token = session()->get('bkash_token');
if (!$token) $this->getToken($account);
return $this->getUrl2($paymentID,'/checkout/payment/status', $account);
}
public function refreshToken($refresh_token, $account=1)
{
if ($account == 1) $account=null;
else $account="_$account";
return $this->getUrlToken("/checkout/token/refresh",$refresh_token, $account);
}
public function searchTransaction($trxID, $account=1)
{
if ($account == 1) $account=null;
else $account="_$account";
$post_token = array(
'trxID' => $trxID
);
$posttoken = json_encode($post_token);
$this->getToken($account);
return $this->getUrl3("/checkout/general/searchTransaction",$posttoken, $account);
}
public function success($message,$transId)
{
return view('bkashT::success',compact('message','transId'));
}
public function cancel($message,$transId=null)
{
return view('bkashT::failed',compact('message','transId'));
}
public function failure($message,$transId=null)
{
return view('bkashT::failed',compact('message','transId'));
}
}

View File

@@ -0,0 +1,40 @@
<?php
namespace Karim007\LaravelBkashTokenize\Payment;
use Karim007\LaravelBkashTokenize\Traits\Helpers;
class TBRefund extends TBBaseApi
{
use Helpers;
public function refund($paymentID,$trxID,$amount,$reason='refined amount',$sku='abc', $account=1)
{
if ($account == 1) $account=null;
else $account="_$account";
$post_token = array(
'paymentID' => $paymentID,
'amount' => $amount,
'trxID' => $trxID,
'reason' => $reason,
'sku' => $sku,
);
$posttoken = json_encode($post_token);
$this->getToken($account);
return $this->getUrl3("/checkout/payment/refund",$posttoken, $account);
}
public function refundStatus($paymentID,$trxID, $account=1)
{
if ($account == 1) $account=null;
else $account="_$account";
$post_token = array(
'paymentID' => $paymentID,
'trxID' => $trxID,
);
$posttoken = json_encode($post_token);
$this->getToken($account);
return $this->getUrl3("/checkout/payment/refund",$posttoken, $account);
}
}

View File

@@ -0,0 +1,144 @@
<?php
namespace Karim007\LaravelBkashTokenize\Traits;
trait Helpers
{
/**
* @return string|null
*/
public function getIp()
{
return request()->ip();
}
protected function getUrlToken($url,$refresh_token=null, $account=null)
{
// if bkash token exists and not expired, return it, no need to call the bkash api again
if(session()->has(['bkash_token','expires_in'])){
$expires_in = session()->get('expires_in');
if($expires_in && time() < ($expires_in - 200) && !$refresh_token){
return [
'id_token' => session()->get('bkash_token'),
'token_type' => session()->get('bkash_token_type'),
'refresh_token' => session()->get('bkash_refresh_token'),
];
}
}
session()->forget('bkash_token');
session()->forget('bkash_token_type');
session()->forget('bkash_refresh_token');
$post_token = array(
'app_key' => config("bkash.bkash_app_key$account"),
'app_secret' => config("bkash.bkash_app_secret$account"),
'refresh_token' => $refresh_token,
);
$url = curl_init($this->baseUrl.$url);
$post_token = json_encode($post_token);
$username = config("bkash.bkash_username$account");
$password = config("bkash.bkash_password$account");
$header = array(
'Content-Type:application/json',
"password:$password",
"username:$username"
);
curl_setopt($url,CURLOPT_HTTPHEADER, $header);
curl_setopt($url,CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($url,CURLOPT_RETURNTRANSFER, true);
curl_setopt($url,CURLOPT_POSTFIELDS, $post_token);
curl_setopt($url,CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($url, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$resultdata = curl_exec($url);
curl_close($url);
$response = json_decode($resultdata, true);
if (array_key_exists('msg', $response)) {
return $response;
}
if (isset($response['id_token']) && isset($response['token_type']) && isset($response['refresh_token'])){
if(isset($response['expires_in'])) {
session()->put('expires_in', $response['expires_in']);
}
session()->put('bkash_token', $response['id_token']);
session()->put('bkash_token_type', $response['token_type']);
session()->put('bkash_refresh_token', $response['refresh_token']);
}
return $response;
}
protected function getUrl($url, $method, $data=null, $account=null)
{
$token = session()->get('bkash_token');
$app_key = config("bkash.bkash_app_key$account");
$url = curl_init($this->baseUrl.$url);
$header = array(
'Content-Type:application/json',
"authorization: $token",
"x-app-key: $app_key"
);
curl_setopt($url, CURLOPT_HTTPHEADER, $header);
curl_setopt($url, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($url, CURLOPT_RETURNTRANSFER, true);
if ($data) curl_setopt($url, CURLOPT_POSTFIELDS, $data);
curl_setopt($url, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($url, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$resultdata = curl_exec($url);
curl_close($url);
return json_decode($resultdata, true);
}
protected function getUrl2($paymentID, $url, $account=null){
$post_token = array(
'paymentID' => $paymentID
);
$url = curl_init($this->baseUrl.$url);
$posttoken = json_encode($post_token);
$app_key = config("bkash.bkash_app_key$account");
$header = array(
'Content-Type:application/json',
'Authorization:' . session()->get('bkash_token'),
'X-APP-Key:'.$app_key
);
curl_setopt($url, CURLOPT_HTTPHEADER, $header);
curl_setopt($url, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($url, CURLOPT_RETURNTRANSFER, true);
curl_setopt($url, CURLOPT_POSTFIELDS, $posttoken);
curl_setopt($url, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($url, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$resultdata = curl_exec($url);
curl_close($url);
return json_decode($resultdata, true);
}
protected function getUrl3($url,$data, $account=null){
$url = curl_init($this->baseUrl.$url);
$app_key = config("bkash.bkash_app_key$account");
$header = array(
'Content-Type:application/json',
'Authorization:' . session()->get('bkash_token'),
'x-app-key:'.$app_key
);
curl_setopt($url, CURLOPT_HTTPHEADER, $header);
curl_setopt($url, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($url, CURLOPT_RETURNTRANSFER, true);
if($data) curl_setopt($url, CURLOPT_POSTFIELDS, $data);
curl_setopt($url, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($url, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$resultdata = curl_exec($url);
curl_close($url);
return json_decode($resultdata, true);
}
protected function getToken($account=null)
{
return $this->getUrlToken('/checkout/token/grant',null, $account);
}
}

View File

@@ -0,0 +1,5 @@
<meta name="csrf-token" content="{{ csrf_token() }}" />
<button class="btn btn-success" >
<a href="{{route('bkash-create-payment')}}">Pay with bKash</a>
</button>

View File

@@ -0,0 +1,128 @@
<!DOCTYPE html>
<html>
<head>
<title>The Title</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<style type="text/css">
body {
background: #adadad;
}
#card {
position: relative;
top: 110px;
width: 320px;
display: block;
margin: auto;
text-align: center;
font-family: 'Source Sans Pro', sans-serif;
}
#upper-side {
padding: 2em;
background-color: #bec34a;
display: block;
color: #fff;
border-top-right-radius: 8px;
border-top-left-radius: 8px;
}
#checkmark {
font-weight: lighter;
fill: #fff;
margin: -3.5em auto auto 20px;
}
#status {
font-weight: lighter;
text-transform: uppercase;
letter-spacing: 2px;
font-size: 1em;
margin-top: -.2em;
margin-bottom: 0;
}
#lower-side {
padding: 2em 2em 5em 2em;
background: #fff;
display: block;
border-bottom-right-radius: 8px;
border-bottom-left-radius: 8px;
}
#message {
margin-top: -.5em;
color: #757575;
letter-spacing: 1px;
}
#contBtn {
position: relative;
top: 1.5em;
text-decoration: none;
background: #8bc34a;
color: #fff;
margin: auto;
padding: .8em 3em;
-webkit-box-shadow: 0px 15px 30px rgba(50, 50, 50, 0.21);
-moz-box-shadow: 0px 15px 30px rgba(50, 50, 50, 0.21);
box-shadow: 0px 15px 30px rgba(50, 50, 50, 0.21);
border-radius: 25px;
-webkit-transition: all .4s ease;
-moz-transition: all .4s ease;
-o-transition: all .4s ease;
transition: all .4s ease;
}
#contBtn:hover {
-webkit-box-shadow: 0px 15px 30px rgba(50, 50, 50, 0.41);
-moz-box-shadow: 0px 15px 30px rgba(50, 50, 50, 0.41);
box-shadow: 0px 15px 30px rgba(50, 50, 50, 0.41);
-webkit-transition: all .4s ease;
-moz-transition: all .4s ease;
-o-transition: all .4s ease;
transition: all .4s ease;
}
</style>
</head>
<body>
<div id='card' class="animated fadeIn">
<div id='upper-side'>
<?xml version = "1.0" encoding = "utf-8"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="150"
height="150" viewBox="0 0 256 256" xml:space="preserve">
<desc>Created with Fabric.js 1.7.22</desc>
<defs>
</defs>
<g transform="translate(128 128) scale(0.72 0.72)" style="">
<g style="stroke: none; stroke-width: 0; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: none; fill-rule: nonzero; opacity: 1;"
transform="translate(-175.05 -175.05000000000004) scale(3.89 3.89)">
<path
d="M 45 88.11 h 40.852 c 3.114 0 5.114 -3.307 3.669 -6.065 L 48.669 4.109 c -1.551 -2.959 -5.786 -2.959 -7.337 0 L 0.479 82.046 c -1.446 2.758 0.555 6.065 3.669 6.065 H 45 z"
style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(214,0,0); fill-rule: nonzero; opacity: 1;"
transform=" matrix(1 0 0 1 0 0) " stroke-linecap="round"/>
<path
d="M 45 64.091 L 45 64.091 c -1.554 0 -2.832 -1.223 -2.9 -2.776 l -2.677 -25.83 c -0.243 -3.245 2.323 -6.011 5.577 -6.011 h 0 c 3.254 0 5.821 2.767 5.577 6.011 L 47.9 61.315 C 47.832 62.867 46.554 64.091 45 64.091 z"
style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(255,255,255); fill-rule: nonzero; opacity: 1;"
transform=" matrix(1 0 0 1 0 0) " stroke-linecap="round"/>
<circle cx="44.995999999999995" cy="74.02600000000001" r="4.626"
style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(255,255,255); fill-rule: nonzero; opacity: 1;"
transform=" matrix(1 0 0 1 0 0) "/>
</g>
</g>
</svg>
<h3 id='status'>
Failed
</h3>
</div>
<div id='lower-side'>
<p id='message'>
{{$message}} {{ $transId ??'' }}
</p>
<a href="/" id="contBtn">Continue</a>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,118 @@
<!DOCTYPE html>
<html>
<head>
<title>The Title</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<style type="text/css">
body {
background: #adadad;
}
#card {
position: relative;
top: 110px;
width: 320px;
display: block;
margin: auto;
text-align: center;
font-family: 'Source Sans Pro', sans-serif;
}
#upper-side {
padding: 2em;
background-color: #8BC34A;
display: block;
color: #fff;
border-top-right-radius: 8px;
border-top-left-radius: 8px;
}
#checkmark {
font-weight: lighter;
fill: #fff;
margin: -3.5em auto auto 20px;
}
#status {
font-weight: lighter;
text-transform: uppercase;
letter-spacing: 2px;
font-size: 1em;
margin-top: -.2em;
margin-bottom: 0;
}
#lower-side {
padding: 2em 2em 5em 2em;
background: #fff;
display: block;
border-bottom-right-radius: 8px;
border-bottom-left-radius: 8px;
}
#message {
margin-top: -.5em;
color: #757575;
letter-spacing: 1px;
}
#contBtn {
position: relative;
top: 1.5em;
text-decoration: none;
background: #8bc34a;
color: #fff;
margin: auto;
padding: .8em 3em;
-webkit-box-shadow: 0px 15px 30px rgba(50, 50, 50, 0.21);
-moz-box-shadow: 0px 15px 30px rgba(50, 50, 50, 0.21);
box-shadow: 0px 15px 30px rgba(50, 50, 50, 0.21);
border-radius: 25px;
-webkit-transition: all .4s ease;
-moz-transition: all .4s ease;
-o-transition: all .4s ease;
transition: all .4s ease;
}
#contBtn:hover {
-webkit-box-shadow: 0px 15px 30px rgba(50, 50, 50, 0.41);
-moz-box-shadow: 0px 15px 30px rgba(50, 50, 50, 0.41);
box-shadow: 0px 15px 30px rgba(50, 50, 50, 0.41);
-webkit-transition: all .4s ease;
-moz-transition: all .4s ease;
-o-transition: all .4s ease;
transition: all .4s ease;
}
</style>
</head>
<body>
<div id='card' class="animated fadeIn">
<div id='upper-side'>
<?xml version = "1.0" encoding = "utf-8"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="checkmark" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
x="0px" y="0px" xml:space="preserve">
<path d="M131.583,92.152l-0.026-0.041c-0.713-1.118-2.197-1.447-3.316-0.734l-31.782,20.257l-4.74-12.65
c-0.483-1.29-1.882-1.958-3.124-1.493l-0.045,0.017c-1.242,0.465-1.857,1.888-1.374,3.178l5.763,15.382
c0.131,0.351,0.334,0.65,0.579,0.898c0.028,0.029,0.06,0.052,0.089,0.08c0.08,0.073,0.159,0.147,0.246,0.209
c0.071,0.051,0.147,0.091,0.222,0.133c0.058,0.033,0.115,0.069,0.175,0.097c0.081,0.037,0.165,0.063,0.249,0.091
c0.065,0.022,0.128,0.047,0.195,0.063c0.079,0.019,0.159,0.026,0.239,0.037c0.074,0.01,0.147,0.024,0.221,0.027
c0.097,0.004,0.194-0.006,0.292-0.014c0.055-0.005,0.109-0.003,0.163-0.012c0.323-0.048,0.641-0.16,0.933-0.346l34.305-21.865
C131.967,94.755,132.296,93.271,131.583,92.152z"/>
<circle fill="none" stroke="#ffffff" stroke-width="5" stroke-miterlimit="10" cx="109.486" cy="104.353"
r="32.53"/>
</svg>
<h3 id='status'>
Success
</h3>
</div>
<div id='lower-side'>
<p id='message'>
{{$message}} Transaction ID {{ $transId }}
</p>
<a href="/" id="contBtn">Continue</a>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,19 @@
<?php
use Illuminate\Support\Facades\Route;
Route::group(['middleware' => ['web']], function () {
// Payment Routes for bKash
Route::get('/bkash/payment', [App\Http\Controllers\BkashTokenizePaymentController::class,'index']);
Route::get('/bkash/create-payment', [App\Http\Controllers\BkashTokenizePaymentController::class,'createPayment'])->name('bkash-create-payment');
Route::get('/bkash/callback', [App\Http\Controllers\BkashTokenizePaymentController::class,'callBack'])->name('bkash-callBack');
//search payment
Route::get('/bkash/search/{trxID}', [App\Http\Controllers\BkashTokenizePaymentController::class,'searchTnx'])->name('bkash-serach');
//refund payment routes
Route::get('/bkash/refund', [App\Http\Controllers\BkashTokenizePaymentController::class,'refund'])->name('bkash-refund');
Route::get('/bkash/refund/status', [App\Http\Controllers\BkashTokenizePaymentController::class,'refundStatus'])->name('bkash-refund-status');
});