@@ -92,7 +92,7 @@ public function getData()
92
92
'HoldTradeAMT ' => $ this ->getHoldTradeAMT (),
93
93
];
94
94
95
- return array_merge ($ sendFields , $ this ->getSendExtend ($ sendFields ));
95
+ return static :: filterValues ( array_merge ($ sendFields , $ this ->getSendExtend ($ sendFields) ));
96
96
}
97
97
98
98
/**
@@ -138,14 +138,12 @@ private function prepareItems()
138
138
*/
139
139
private function getSendExtend ($ sendFields )
140
140
{
141
- return static ::filterValues ([
142
- 'SendExtend ' => array_merge (
143
- $ this ->getCreditFields ($ sendFields ['ChoosePayment ' ]),
144
- $ this ->getATMFields ($ sendFields ['ChoosePayment ' ]),
145
- $ this ->getCvsFields ($ sendFields ['ChoosePayment ' ]),
146
- $ this ->getInvoiceFields ($ sendFields ['InvoiceMark ' ])
147
- ),
148
- ]);
141
+ return array_merge (
142
+ $ this ->getCreditFields ($ sendFields ['ChoosePayment ' ]),
143
+ $ this ->getATMFields ($ sendFields ['ChoosePayment ' ]),
144
+ $ this ->getCvsFields ($ sendFields ['ChoosePayment ' ]),
145
+ $ this ->getInvoiceFields ($ sendFields ['InvoiceMark ' ])
146
+ );
149
147
}
150
148
151
149
/**
@@ -157,7 +155,7 @@ private function getCreditFields($choosePayment)
157
155
return in_array ($ choosePayment , [
158
156
ECPay_PaymentMethod::ALL ,
159
157
ECPay_PaymentMethod::Credit,
160
- ], true ) ? static :: filterValues ( [
158
+ ], true ) ? [
161
159
'CreditInstallment ' => $ this ->getCreditInstallment (),
162
160
'InstallmentAmount ' => $ this ->getInstallmentAmount (),
163
161
'Redeem ' => $ this ->getRedeem (),
@@ -170,7 +168,7 @@ private function getCreditFields($choosePayment)
170
168
'Frequency ' => $ this ->getFrequency (),
171
169
'ExecTimes ' => $ this ->getExecTimes (),
172
170
'PeriodReturnURL ' => $ this ->getPeriodReturnURL (),
173
- ]) : [];
171
+ ] : [];
174
172
}
175
173
176
174
/**
@@ -182,11 +180,11 @@ private function getATMFields($choosePayment)
182
180
return in_array ($ choosePayment , [
183
181
ECPay_PaymentMethod::ALL ,
184
182
ECPay_PaymentMethod::ATM ,
185
- ], true ) ? static :: filterValues ( [
183
+ ], true ) ? [
186
184
'ExpireDate ' => $ this ->getExpireDate (),
187
185
'PaymentInfoURL ' => $ this ->getPaymentInfoURL (),
188
186
'ClientRedirectURL ' => $ this ->getClientRedirectURL (),
189
- ]) : [];
187
+ ] : [];
190
188
}
191
189
192
190
/**
@@ -199,15 +197,15 @@ private function getCvsFields($choosePayment)
199
197
ECPay_PaymentMethod::ALL ,
200
198
ECPay_PaymentMethod::CVS ,
201
199
ECPay_PaymentMethod::BARCODE ,
202
- ], true ) ? static :: filterValues ( [
200
+ ], true ) ? [
203
201
'Desc_1 ' => $ this ->getDesc_1 (),
204
202
'Desc_2 ' => $ this ->getDesc_2 (),
205
203
'Desc_3 ' => $ this ->getDesc_3 (),
206
204
'Desc_4 ' => $ this ->getDesc_4 (),
207
205
'PaymentInfoURL ' => $ this ->getPaymentInfoURL (),
208
206
'ClientRedirectURL ' => $ this ->getClientRedirectURL (),
209
207
'StoreExpireDate ' => $ this ->getStoreExpireDate (),
210
- ]) : [];
208
+ ] : [];
211
209
}
212
210
213
211
/**
@@ -216,7 +214,7 @@ private function getCvsFields($choosePayment)
216
214
*/
217
215
private function getInvoiceFields ($ invoiceMark )
218
216
{
219
- return $ invoiceMark === ECPay_InvoiceState::Yes ? static :: filterValues ( [
217
+ return $ invoiceMark === ECPay_InvoiceState::Yes ? [
220
218
'RelateNumber ' => $ this ->getRelateNumber (),
221
219
'CustomerIdentifier ' => $ this ->getCustomerIdentifier (),
222
220
'CarruerType ' => $ this ->getCarruerType (),
@@ -239,7 +237,7 @@ private function getInvoiceFields($invoiceMark)
239
237
'InvoiceItemPrice ' => $ this ->getInvoiceItemPrice (),
240
238
'InvoiceItemTaxType ' => $ this ->getInvoiceItemTaxType (),
241
239
'InvType ' => $ this ->getInvType (),
242
- ]) : [];
240
+ ] : [];
243
241
}
244
242
245
243
private static function filterValues ($ values )
0 commit comments