Skip to content

Commit

Permalink
add refund facade
Browse files Browse the repository at this point in the history
  • Loading branch information
dipudey committed Sep 1, 2022
1 parent bd066ee commit e2c23a7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/Facade/NagadRefund.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace Codeboxr\Nagad\Facade;

use Illuminate\Support\Facades\Facade;

/**
* @method static refund($paymentRefId, $refundAmount)
*/
class NagadRefund extends Facade
{
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor()
{
return 'refundPayment';
}
}
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\Refund;
use Codeboxr\Nagad\Payment\Payment;
use Illuminate\Support\ServiceProvider;

Expand Down Expand Up @@ -34,5 +35,9 @@ public function register()
$this->app->bind("payment", function () {
return new Payment();
});

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

0 comments on commit e2c23a7

Please sign in to comment.