Skip to content

Commit

Permalink
add nagad payment facade
Browse files Browse the repository at this point in the history
  • Loading branch information
dipudey committed Jul 15, 2022
1 parent c879b65 commit dee0b45
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/Facade/NagadPayment.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace Codeboxr\Nagad\Facade;

use Illuminate\Support\Facades\Facade;

/**
* @method static create($amount, $invoice)
* @method static verify($paymentRefId)
*/
class NagadPayment extends Facade
{
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor()
{
return 'payment';
}
}
5 changes: 5 additions & 0 deletions src/NagadServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Codeboxr\Nagad;

use Codeboxr\Nagad\Payment\Payment;
use Illuminate\Support\ServiceProvider;

class NagadServiceProvider extends ServiceProvider
Expand Down Expand Up @@ -29,5 +30,9 @@ public function boot()
public function register()
{
$this->mergeConfigFrom(__DIR__ . "/../config/nagad.php", "nagad");

$this->app->bind("payment", function () {
return new Payment();
});
}
}

0 comments on commit dee0b45

Please sign in to comment.