Skip to content

Commit 7fbdf51

Browse files
Added facade gateways.
1 parent 98d6392 commit 7fbdf51

File tree

11 files changed

+256
-2
lines changed

11 files changed

+256
-2
lines changed

composer.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@
1919
"require": {
2020
"php": "^7.1",
2121
"ignited/laravel-omnipay": "^3.0",
22-
"illuminate/support": "^5.7"
22+
"illuminate/support": "^5.7",
23+
"jackiedo/omnipay-onepay": "^1.0",
24+
"jackiedo/omnipay-vnpay": "^1.0",
25+
"jackiedo/omnipay-vtcpay": "^1.0",
26+
"phpviet/omnipay-momo": "^1.0"
2327
},
2428
"require-dev": {
2529
"orchestra/testbench": "^3.7",
@@ -51,5 +55,5 @@
5155
"PHPViet\\Laravel\\Omnipay\\OmnipayServiceProvider"
5256
]
5357
}
54-
}
58+
}
5559
}

config/laravel-omnipay.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
return [
4+
// Add in each gateway here
5+
'gateways' => [
6+
'momo_aio' => [
7+
'driver' => 'MoMo_AllInOne',
8+
'options' => [
9+
],
10+
],
11+
],
12+
];
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
namespace PHPViet\Laravel\Omnipay\Facades;
4+
5+
use Illuminate\Support\Facades\Facade;
6+
7+
/**
8+
* @author Vuong Minh <vuongxuongminh@gmail.com>
9+
* @since 1.0.0
10+
*/
11+
class AllInOneGateway extends Facade
12+
{
13+
/**
14+
* {@inheritdoc}
15+
*/
16+
protected static function getFacadeAccessor()
17+
{
18+
return static::$app['omnipay']->gateway('momo_aio');
19+
}
20+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
/**
3+
* @link https://github.com/phpviet/laravel-omnipay
4+
*
5+
* @copyright (c) PHP Viet
6+
* @license [MIT](https://opensource.org/licenses/MIT)
7+
*/
8+
9+
namespace PHPViet\Laravel\Omnipay\Facades\MoMo;
10+
11+
use Illuminate\Support\Facades\Facade;
12+
13+
/**
14+
* @author Vuong Minh <vuongxuongminh@gmail.com>
15+
* @since 1.0.0
16+
*/
17+
class AppInAppGateway extends Facade
18+
{
19+
/**
20+
* {@inheritdoc}
21+
*/
22+
protected static function getFacadeAccessor()
23+
{
24+
return static::$app['omnipay']->gateway('momo_apa');
25+
}
26+
}

src/Facades/MoMo/POSGateway.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
/**
3+
* @link https://github.com/phpviet/laravel-omnipay
4+
*
5+
* @copyright (c) PHP Viet
6+
* @license [MIT](https://opensource.org/licenses/MIT)
7+
*/
8+
9+
namespace PHPViet\Laravel\Omnipay\Facades;
10+
11+
use Illuminate\Support\Facades\Facade;
12+
13+
/**
14+
* @author Vuong Minh <vuongxuongminh@gmail.com>
15+
* @since 1.0.0
16+
*/
17+
class POSGateway extends Facade
18+
{
19+
/**
20+
* {@inheritdoc}
21+
*/
22+
protected static function getFacadeAccessor()
23+
{
24+
return static::$app['omnipay']->gateway('momo_pos');
25+
}
26+
}

src/Facades/MoMo/QRCodeGateway.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
/**
3+
* @link https://github.com/phpviet/laravel-omnipay
4+
*
5+
* @copyright (c) PHP Viet
6+
* @license [MIT](https://opensource.org/licenses/MIT)
7+
*/
8+
9+
namespace PHPViet\Laravel\Omnipay\Facades;
10+
11+
use Illuminate\Support\Facades\Facade;
12+
13+
/**
14+
* @author Vuong Minh <vuongxuongminh@gmail.com>
15+
* @since 1.0.0
16+
*/
17+
class QRCodeGateway extends Facade
18+
{
19+
/**
20+
* {@inheritdoc}
21+
*/
22+
protected static function getFacadeAccessor()
23+
{
24+
return static::$app['omnipay']->gateway('momo_qrcode');
25+
}
26+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
/**
3+
* @link https://github.com/phpviet/laravel-omnipay
4+
*
5+
* @copyright (c) PHP Viet
6+
* @license [MIT](https://opensource.org/licenses/MIT)
7+
*/
8+
9+
namespace PHPViet\Laravel\Omnipay\Facades\OnePay;
10+
11+
use Illuminate\Support\Facades\Facade;
12+
13+
/**
14+
* @author Vuong Minh <vuongxuongminh@gmail.com>
15+
* @since 1.0.0
16+
*/
17+
class DomesticGateway extends Facade
18+
{
19+
/**
20+
* {@inheritdoc}
21+
*/
22+
protected static function getFacadeAccessor()
23+
{
24+
return static::$app['omnipay']->gateway('onepay_domestic');
25+
}
26+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
/**
3+
* @link https://github.com/phpviet/laravel-omnipay
4+
*
5+
* @copyright (c) PHP Viet
6+
* @license [MIT](https://opensource.org/licenses/MIT)
7+
*/
8+
9+
namespace PHPViet\Laravel\Omnipay\Facades\OnePay;
10+
11+
use Illuminate\Support\Facades\Facade;
12+
13+
/**
14+
* @author Vuong Minh <vuongxuongminh@gmail.com>
15+
* @since 1.0.0
16+
*/
17+
class InternationalGateway extends Facade
18+
{
19+
/**
20+
* {@inheritdoc}
21+
*/
22+
protected static function getFacadeAccessor()
23+
{
24+
return static::$app['omnipay']->gateway('onepay_international');
25+
}
26+
}

src/Facades/VNPay/Gateway.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
/**
3+
* @link https://github.com/phpviet/laravel-omnipay
4+
*
5+
* @copyright (c) PHP Viet
6+
* @license [MIT](https://opensource.org/licenses/MIT)
7+
*/
8+
9+
namespace PHPViet\Laravel\Omnipay\Facades\VNPay;
10+
11+
use Illuminate\Support\Facades\Facade;
12+
13+
/**
14+
* @author Vuong Minh <vuongxuongminh@gmail.com>
15+
* @since 1.0.0
16+
*/
17+
class Gateway extends Facade
18+
{
19+
/**
20+
* {@inheritdoc}
21+
*/
22+
protected static function getFacadeAccessor()
23+
{
24+
return static::$app['omnipay']->gateway('vnpay');
25+
}
26+
}

src/Facades/VTCPay/Gateway.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
/**
3+
* @link https://github.com/phpviet/laravel-omnipay
4+
*
5+
* @copyright (c) PHP Viet
6+
* @license [MIT](https://opensource.org/licenses/MIT)
7+
*/
8+
9+
namespace PHPViet\Laravel\Omnipay\Facades\VTCPay;
10+
11+
use Illuminate\Support\Facades\Facade;
12+
13+
/**
14+
* @author Vuong Minh <vuongxuongminh@gmail.com>
15+
* @since 1.0.0
16+
*/
17+
class Gateway extends Facade
18+
{
19+
/**
20+
* {@inheritdoc}
21+
*/
22+
protected static function getFacadeAccessor()
23+
{
24+
return static::$app['omnipay']->gateway('vtcpay');
25+
}
26+
}

0 commit comments

Comments
 (0)