Skip to content

Commit 3faf7ca

Browse files
Updated VNPay gateway apis
1 parent 5ecf187 commit 3faf7ca

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

src/Facades/VNPay/Gateway.php

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
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 = [])
16+
*
1417
* @author Vuong Minh <[email protected]>
1518
* @since 1.0.0
1619
*/
@@ -23,4 +26,43 @@ protected static function getFacadeAccessor()
2326
{
2427
return static::$app['omnipay']->gateway('VNPay');
2528
}
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+
}
2668
}

0 commit comments

Comments
 (0)