Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ab5135d

Browse files
Added test cases
1 parent 7a91b18 commit ab5135d

23 files changed

+1035
-87
lines changed

‎src/AbstractGateway.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public function getDefaultParameters(): array
3636
{
3737
return [
3838
'vpc_Version' => 2,
39-
'vpc_Locale' => 'vn',
4039
];
4140
}
4241
}

‎src/Concerns/Parameters.php‎

Lines changed: 13 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ trait Parameters
2121
*/
2222
public function getVpcMerchant(): ?string
2323
{
24-
$this->getParameter('vpc_Merchant');
24+
return$this->getParameter('vpc_Merchant');
2525
}
2626

2727
/**
2828
* Thiết lập giá trị merchant id.
2929
*
30-
* @param string $merchant
30+
* @param null|string $merchant
3131
* @return $this
3232
*/
33-
public function setVpcMerchant(string $merchant)
33+
public function setVpcMerchant(?string $merchant)
3434
{
3535
return $this->setParameter('vpc_Merchant', $merchant);
3636
}
@@ -48,10 +48,10 @@ public function getVpcAccessCode(): ?string
4848
/**
4949
* Thiết lập giá trị access code.
5050
*
51-
* @param string $code
51+
* @param null|string $code
5252
* @return $this
5353
*/
54-
public function setVpcAccessCode(string $code)
54+
public function setVpcAccessCode(?string $code)
5555
{
5656
return $this->setParameter('vpc_AccessCode', $code);
5757
}
@@ -69,10 +69,10 @@ public function getVpcHashKey(): ?string
6969
/**
7070
* Thiết lập giá trị hash key dùng để tạo chữ ký dữ liệu (secure hash).
7171
*
72-
* @param string $key
72+
* @param null|string $key
7373
* @return $this
7474
*/
75-
public function setVpcHashKey(string $key)
75+
public function setVpcHashKey(?string $key)
7676
{
7777
return $this->setParameter('vpc_HashKey', $key);
7878
}
@@ -90,10 +90,10 @@ public function getVpcUser(): ?string
9090
/**
9191
* Thiết lập giá trị user.
9292
*
93-
* @param string $user
93+
* @param null|string $user
9494
* @return $this
9595
*/
96-
public function setVpcUser(string $user)
96+
public function setVpcUser(?string $user)
9797
{
9898
return $this->setParameter('vpc_User', $user);
9999
}
@@ -111,10 +111,10 @@ public function getVpcPassword(): ?string
111111
/**
112112
* Thiết lập giá trị password.
113113
*
114-
* @param string $password
114+
* @param null|string $password
115115
* @return $this
116116
*/
117-
public function setVpcPassword(string $password)
117+
public function setVpcPassword(?string $password)
118118
{
119119
return $this->setParameter('vpc_Password', $password);
120120
}
@@ -132,32 +132,11 @@ public function getVpcVersion(): ?string
132132
/**
133133
* Thiết lập giá trị version muốn sử dụng.
134134
*
135-
* @param string $version
135+
* @param null|string $version
136136
* @return $this
137137
*/
138-
public function setVpcVersion(string $version)
138+
public function setVpcVersion(?string $version)
139139
{
140140
return $this->setParameter('vpc_Version', $version);
141141
}
142-
143-
/**
144-
* Trả giao diện ngôn ngữ khách dùng để thanh toán.
145-
*
146-
* @return null|string
147-
*/
148-
public function getVpcLocale(): ?string
149-
{
150-
return $this->getParameter('vpc_Locale');
151-
}
152-
153-
/**
154-
* Thiết lập giao diện ngôn ngữ khách dùng để thanh toán.
155-
*
156-
* @param string $locale
157-
* @return $this
158-
*/
159-
public function setVpcLocale(string $locale)
160-
{
161-
return $this->setParameter('vpc_Locale', $locale);
162-
}
163142
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /