2
2
3
3
namespace Omnipay \ECPay \Message ;
4
4
5
- use ECPay_InvoiceState ;
6
- use ECPay_PaymentMethod ;
7
5
use Omnipay \Common \Exception \InvalidRequestException ;
8
6
use Omnipay \Common \Message \AbstractRequest ;
9
7
use Omnipay \ECPay \Traits \HasATMFields ;
@@ -152,10 +150,7 @@ private function getSendExtend($sendFields)
152
150
*/
153
151
private function getCreditFields ($ choosePayment )
154
152
{
155
- return in_array ($ choosePayment , [
156
- ECPay_PaymentMethod::ALL ,
157
- ECPay_PaymentMethod::Credit,
158
- ], true ) ? [
153
+ return in_array ($ choosePayment , ['ALL ' , 'Credit ' ], true ) ? [
159
154
'CreditInstallment ' => $ this ->getCreditInstallment (),
160
155
'InstallmentAmount ' => $ this ->getInstallmentAmount (),
161
156
'Redeem ' => $ this ->getRedeem (),
@@ -177,10 +172,7 @@ private function getCreditFields($choosePayment)
177
172
*/
178
173
private function getATMFields ($ choosePayment )
179
174
{
180
- return in_array ($ choosePayment , [
181
- ECPay_PaymentMethod::ALL ,
182
- ECPay_PaymentMethod::ATM ,
183
- ], true ) ? [
175
+ return in_array ($ choosePayment , ['ALL ' , 'ATM ' ], true ) ? [
184
176
'ExpireDate ' => $ this ->getExpireDate (),
185
177
'PaymentInfoURL ' => $ this ->getPaymentInfoURL (),
186
178
'ClientRedirectURL ' => $ this ->getClientRedirectURL (),
@@ -193,11 +185,7 @@ private function getATMFields($choosePayment)
193
185
*/
194
186
private function getCvsFields ($ choosePayment )
195
187
{
196
- return in_array ($ choosePayment , [
197
- ECPay_PaymentMethod::ALL ,
198
- ECPay_PaymentMethod::CVS ,
199
- ECPay_PaymentMethod::BARCODE ,
200
- ], true ) ? [
188
+ return in_array ($ choosePayment , ['ALL ' , 'CVS ' , 'BARCODE ' ], true ) ? [
201
189
'Desc_1 ' => $ this ->getDesc_1 (),
202
190
'Desc_2 ' => $ this ->getDesc_2 (),
203
191
'Desc_3 ' => $ this ->getDesc_3 (),
@@ -214,7 +202,7 @@ private function getCvsFields($choosePayment)
214
202
*/
215
203
private function getInvoiceFields ($ invoiceMark )
216
204
{
217
- return $ invoiceMark === ECPay_InvoiceState::Yes ? [
205
+ return $ invoiceMark === ' Y ' ? [
218
206
'RelateNumber ' => $ this ->getRelateNumber (),
219
207
'CustomerIdentifier ' => $ this ->getCustomerIdentifier (),
220
208
'CarruerType ' => $ this ->getCarruerType (),
0 commit comments