Skip to content

Commit bad9e89

Browse files
Change all gateways to PHPViet
1 parent 0c28dbc commit bad9e89

File tree

9 files changed

+43
-127
lines changed

9 files changed

+43
-127
lines changed

config/laravel-omnipay.php

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
'accessKey' => '',
1212
'secretKey' => '',
1313
'partnerCode' => '',
14+
'testMode' => false,
1415
],
1516
],
1617
'MoMoQRCode' => [
@@ -19,6 +20,7 @@
1920
'accessKey' => '',
2021
'secretKey' => '',
2122
'partnerCode' => '',
23+
'testMode' => false,
2224
],
2325
],
2426
'MoMoAIA' => [
@@ -28,6 +30,7 @@
2830
'secretKey' => '',
2931
'partnerCode' => '',
3032
'publicKey' => '',
33+
'testMode' => false,
3134
],
3235
],
3336
'MoMoPOS' => [
@@ -37,44 +40,44 @@
3740
'secretKey' => '',
3841
'partnerCode' => '',
3942
'publicKey' => '',
43+
'testMode' => false,
4044
],
4145
],
4246
'OnePayDomestic' => [
4347
'driver' => 'OnePay_Domestic',
4448
'options' => [
45-
'merchant' => '',
46-
'accessCode' => '',
47-
'hashCode' => '',
48-
'user' => '',
49-
'password' => '',
49+
'vpcMerchant' => '',
50+
'vpcAccessCode' => '',
51+
'vpcUser' => '',
52+
'vpcPassword' => '',
53+
'vpcHashKey' => '',
5054
'testMode' => false,
5155
],
5256
],
5357
'OnePayInternational' => [
5458
'driver' => 'OnePay_International',
5559
'options' => [
56-
'merchant' => '',
57-
'accessCode' => '',
58-
'hashCode' => '',
59-
'user' => '',
60-
'password' => '',
60+
'vpcMerchant' => '',
61+
'vpcAccessCode' => '',
62+
'vpcUser' => '',
63+
'vpcPassword' => '',
64+
'vpcHashKey' => '',
6165
'testMode' => false,
6266
],
6367
],
6468
'VTCPay' => [
65-
'driver' => 'VtcPay',
69+
'driver' => 'VTCPay',
6670
'options' => [
67-
'receiverAccount' => '',
6871
'websiteId' => '',
6972
'securityCode' => '',
7073
'testMode' => false,
7174
],
7275
],
7376
'VNPay' => [
74-
'driver' => 'VnPay',
77+
'driver' => 'VNPay',
7578
'options' => [
76-
'tmnCode' => '',
77-
'hashSecret' => '',
79+
'vnpTmnCode' => '',
80+
'vnpHashSecret' => '',
7881
'testMode' => false,
7982
],
8083
],

src/Facades/MoMo/AllInOneGateway.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace PHPViet\Laravel\Omnipay\Facades;
3+
namespace PHPViet\Laravel\Omnipay\Facades\MoMo;
44

55
use Illuminate\Support\Facades\Facade;
66

src/Facades/MoMo/POSGateway.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @license [MIT](https://opensource.org/licenses/MIT)
77
*/
88

9-
namespace PHPViet\Laravel\Omnipay\Facades;
9+
namespace PHPViet\Laravel\Omnipay\Facades\MoMo;
1010

1111
use Illuminate\Support\Facades\Facade;
1212

src/Facades/MoMo/QRCodeGateway.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @license [MIT](https://opensource.org/licenses/MIT)
77
*/
88

9-
namespace PHPViet\Laravel\Omnipay\Facades;
9+
namespace PHPViet\Laravel\Omnipay\Facades\MoMo;
1010

1111
use Illuminate\Support\Facades\Facade;
1212

src/Facades/OnePay/DomesticGateway.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,18 @@
88

99
namespace PHPViet\Laravel\Omnipay\Facades\OnePay;
1010

11+
use Illuminate\Support\Facades\Facade;
12+
1113
/**
12-
* @method static \Omnipay\OnePay\Message\DomesticPurchaseRequest purchase(array $options = [])
13-
* @method static \Omnipay\OnePay\Message\DomesticCompletePurchaseRequest completePurchase(array $options = [])
14-
* @method static \Omnipay\OnePay\Message\DomesticCompletePurchaseRequest notification(array $options = [])
15-
* @method static \Omnipay\OnePay\Message\DomesticFetchCheckoutRequest queryTransaction(array $options = [])
14+
* @method static \Omnipay\OnePay\Message\Domestic\PurchaseRequest purchase(array $options = [])
15+
* @method static \Omnipay\OnePay\Message\Domestic\QueryTransactionRequest queryTransaction(array $options = [])
16+
* @method static \Omnipay\OnePay\Message\IncomingRequest completePurchase(array $options = [])
17+
* @method static \Omnipay\OnePay\Message\IncomingRequest notification(array $options = [])
1618
*
1719
* @author Vuong Minh <vuongxuongminh@gmail.com>
1820
* @since 1.0.0
1921
*/
20-
class DomesticGateway extends Gateway
22+
class DomesticGateway extends Facade
2123
{
2224
/**
2325
* {@inheritdoc}

src/Facades/OnePay/Gateway.php

Lines changed: 0 additions & 42 deletions
This file was deleted.

src/Facades/OnePay/InternationalGateway.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,18 @@
88

99
namespace PHPViet\Laravel\Omnipay\Facades\OnePay;
1010

11+
use Illuminate\Support\Facades\Facade;
12+
1113
/**
12-
* @method static \Omnipay\OnePay\Message\InternationalPurchaseRequest purchase(array $options = [])
13-
* @method static \Omnipay\OnePay\Message\InternationalCompletePurchaseRequest completePurchase(array $options = [])
14-
* @method static \Omnipay\OnePay\Message\InternationalCompletePurchaseRequest notification(array $options = [])
15-
* @method static \Omnipay\OnePay\Message\InternationalFetchCheckoutRequest queryTransaction(array $options = [])
14+
* @method static \Omnipay\OnePay\Message\International\PurchaseRequest purchase(array $options = [])
15+
* @method static \Omnipay\OnePay\Message\International\QueryTransactionRequest queryTransaction(array $options = [])
16+
* @method static \Omnipay\OnePay\Message\IncomingRequest completePurchase(array $options = [])
17+
* @method static \Omnipay\OnePay\Message\IncomingRequest notification(array $options = [])
1618
*
1719
* @author Vuong Minh <vuongxuongminh@gmail.com>
1820
* @since 1.0.0
1921
*/
20-
class InternationalGateway extends Gateway
22+
class InternationalGateway extends Facade
2123
{
2224
/**
2325
* {@inheritdoc}

src/Facades/VNPay/Gateway.php

Lines changed: 5 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@
1111
use Illuminate\Support\Facades\Facade;
1212

1313
/**
14-
* @method static \Omnipay\VnPay\Message\PurchaseRequest purchase(array $options = [])
15-
* @method static \Omnipay\VnPay\Message\CompletePurchaseRequest completePurchase(array $options = [])
14+
* @method static \Omnipay\VNPay\Message\PurchaseRequest purchase(array $options = [])
15+
* @method static \Omnipay\VNPay\Message\IncomingRequest completePurchase(array $options = [])
16+
* @method static \Omnipay\VNPay\Message\IncomingRequest notification(array $options = [])
17+
* @method static \Omnipay\VNPay\Message\QueryTransactionRequest queryTransaction(array $options = [])
18+
* @method static \Omnipay\VNPay\Message\RefundRequest refund(array $options = [])
1619
*
1720
* @author Vuong Minh <vuongxuongminh@gmail.com>
1821
* @since 1.0.0
@@ -26,43 +29,4 @@ protected static function getFacadeAccessor()
2629
{
2730
return static::$app['omnipay']->gateway('VNPay');
2831
}
29-
30-
/**
31-
* Tạo yêu cầu truy vấn trạng thái giao dịch đến VNPay.
32-
*
33-
* Đây là phương thức ánh xạ của [[fetchTransaction()]] với mục đích đồng bộ các phương thức so với các cổng thanh toán khác.
34-
*
35-
* @param array $options
36-
* @return \Omnipay\VnPay\Message\FetchTransactionRequest
37-
*/
38-
public static function queryTransaction(array $options = [])
39-
{
40-
return static::fetchTransaction($options);
41-
}
42-
43-
/**
44-
* Tạo yêu cầu truy vấn trạng thái thanh toán giao dịch đến VNPay.
45-
*
46-
* Đây là phương thức ánh xạ của [[fetchCheckout()]] với mục đích đồng bộ các phương thức so với các cổng thanh toán khác.
47-
*
48-
* @param array $options
49-
* @return \Omnipay\VnPay\Message\FetchCheckoutRequest
50-
*/
51-
public static function queryCheckout(array $options = [])
52-
{
53-
return static::fetchCheckout($options);
54-
}
55-
56-
/**
57-
* Tạo yêu cầu truy vấn trạng thái giao dịch hoàn tiền đến VNPay.
58-
*
59-
* Đây là phương thức ánh xạ của [[fetchRefund()]] với mục đích đồng bộ các phương thức so với các cổng thanh toán khác.
60-
*
61-
* @param array $options
62-
* @return \Omnipay\VnPay\Message\FetchRefundRequest
63-
*/
64-
public static function queryRefund(array $options = [])
65-
{
66-
return static::fetchRefund($options);
67-
}
6832
}

src/Facades/VTCPay/Gateway.php

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
use Illuminate\Support\Facades\Facade;
1212

1313
/**
14-
* @method static \Omnipay\VtcPay\Message\PurchaseRequest purchase(array $options = [])
15-
* @method static \Omnipay\VtcPay\Message\CompletePurchaseRequest completePurchase(array $options = [])
14+
* @method static \Omnipay\VTCPay\Message\PurchaseRequest purchase(array $options = [])
15+
* @method static \Omnipay\VTCPay\Message\CompletePurchaseRequest completePurchase(array $options = [])
16+
* @method static \Omnipay\VTCPay\Message\NotificationRequest notification(array $options = [])
1617
*
1718
* @author Vuong Minh <vuongxuongminh@gmail.com>
1819
* @since 1.0.0
@@ -26,18 +27,4 @@ protected static function getFacadeAccessor()
2627
{
2728
return static::$app['omnipay']->gateway('VTCPay');
2829
}
29-
30-
/**
31-
* Tạo yêu cầu truy vấn notification từ VTCPay.
32-
*
33-
* Đây là phương thức ánh xạ của [[acceptNotification()]] với mục đích đồng bộ các phương thức so với các cổng thanh toán khác.
34-
*
35-
* @param array $options
36-
*
37-
* @return \Omnipay\VtcPay\Message\AcceptNotificationRequest
38-
*/
39-
public static function notification(array $options = [])
40-
{
41-
return static::getFacadeAccessor()::acceptNotification($options);
42-
}
4330
}

0 commit comments

Comments
 (0)