@@ -231,32 +231,26 @@ protected function getHttpMethod(): string
231231
232232 /**
233233 * @return string
234- * @throws \Omnipay\Common\Exception\InvalidRequestException
235234 */
236235 protected function getTransactionHash (): string
237236 {
238- $ amount = (int )$ this ->getAmount ();
239-
240237 return strtoupper (SHA1 (sprintf ('%s%s%s%s%s ' ,
241238 $ this ->getOrderId (),
242239 $ this ->getTerminalId (),
243240 $ this ->getCard ()->getNumber (),
244- $ amount ,
241+ $ this -> getAmountInteger () ,
245242 $ this ->getSecurityHash ())));
246243 }
247244
248245 /**
249246 * @return string
250- * @throws \Omnipay\Common\Exception\InvalidRequestException
251247 */
252248 protected function getTransactionHashWithoutCardNumber (): string
253249 {
254- $ amount = (int )$ this ->getAmount ();
255-
256250 return strtoupper (SHA1 (sprintf ('%s%s%s%s ' ,
257251 $ this ->getOrderId (),
258252 $ this ->getTerminalId (),
259- $ amount ,
253+ $ this -> getAmountInteger () ,
260254 $ this ->getSecurityHash ())));
261255 }
262256
@@ -293,7 +287,7 @@ protected function getSalesRequestParams(): array
293287 $ data ['Transaction ' ] = array (
294288 'Type ' => 'sales ' ,
295289 'InstallmentCnt ' => $ this ->getInstallment (),
296- 'Amount ' => ( int ) $ this ->getAmount (),
290+ 'Amount ' => $ this ->getAmountInteger (),
297291 'CurrencyCode ' => $ this ->currency_list [$ this ->getCurrency ()],
298292 'CardholderPresentCode ' => "0 " ,
299293 'MotoInd ' => "N "
@@ -329,7 +323,7 @@ protected function getCompleteSalesRequestParams(): array
329323
330324 $ data ['Transaction ' ] = array (
331325 'Type ' => 'sales ' ,
332- 'Amount ' => ( int ) $ this ->getAmount (),
326+ 'Amount ' => $ this ->getAmountInteger (),
333327 'CurrencyCode ' => $ this ->currency_list [$ this ->getCurrency ()],
334328 'MotoInd ' => "N "
335329 );
@@ -339,7 +333,6 @@ protected function getCompleteSalesRequestParams(): array
339333
340334 /**
341335 * @return array
342- * @throws \Omnipay\Common\Exception\InvalidRequestException
343336 */
344337 protected function getAuthorizeRequestParams (): array
345338 {
@@ -365,7 +358,7 @@ protected function getAuthorizeRequestParams(): array
365358 $ data ['Transaction ' ] = array (
366359 'Type ' => 'preauth ' ,
367360 'InstallmentCnt ' => $ this ->getInstallment (),
368- 'Amount ' => ( int ) $ this ->getAmount (),
361+ 'Amount ' => $ this ->getAmountInteger (),
369362 'CurrencyCode ' => $ this ->currency_list [$ this ->getCurrency ()],
370363 'CardholderPresentCode ' => "0 " ,
371364 'MotoInd ' => "N "
@@ -387,7 +380,7 @@ protected function getSalesRequestParamsFor3d(): array
387380 $ params ['terminalid ' ] = $ this ->getTerminalId ();
388381 $ params ['terminalmerchantid ' ] = $ this ->getMerchantId ();
389382 $ params ['txntype ' ] = 'sales ' ;
390- $ params ['txnamount ' ] = ( int ) $ this ->getAmount ();
383+ $ params ['txnamount ' ] = $ this ->getAmountInteger ();
391384 $ params ['txncurrencycode ' ] = $ this ->currency_list [$ this ->getCurrency ()];
392385 $ params ['txninstallmentcount ' ] = $ this ->getInstallment ();
393386 $ params ['customeremailaddress ' ] = $ this ->getCard ()->getEmail ();
0 commit comments