Skip to content

Commit e2c23a7

Browse files
committed
add refund facade
1 parent bd066ee commit e2c23a7

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

src/Facade/NagadRefund.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
namespace Codeboxr\Nagad\Facade;
4+
5+
use Illuminate\Support\Facades\Facade;
6+
7+
/**
8+
* @method static refund($paymentRefId, $refundAmount)
9+
*/
10+
class NagadRefund extends Facade
11+
{
12+
/**
13+
* Get the registered name of the component.
14+
*
15+
* @return string
16+
*/
17+
protected static function getFacadeAccessor()
18+
{
19+
return 'refundPayment';
20+
}
21+
}

src/NagadServiceProvider.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Codeboxr\Nagad;
44

5+
use Codeboxr\Nagad\Payment\Refund;
56
use Codeboxr\Nagad\Payment\Payment;
67
use Illuminate\Support\ServiceProvider;
78

@@ -34,5 +35,9 @@ public function register()
3435
$this->app->bind("payment", function () {
3536
return new Payment();
3637
});
38+
39+
$this->app->bind("refundPayment", function () {
40+
return new Refund();
41+
});
3742
}
3843
}

0 commit comments

Comments
 (0)