diff --git a/app/code/community/Hps/Transit/Model/Payment.php b/app/code/community/Hps/Transit/Model/Payment.php index 23e0660..dfd2e43 100644 --- a/app/code/community/Hps/Transit/Model/Payment.php +++ b/app/code/community/Hps/Transit/Model/Payment.php @@ -139,7 +139,7 @@ private function _authorize(Varien_Object $payment, $amount, $capture) $builder = Transaction::fromId($payment->getCcTransId())->capture(); } else { $requestType = $capture ? 'charge' : 'authorize'; - $builder = $cardOrToken->{$requestType}(str_replace(',', '', (string) $amount)) + $builder = $cardOrToken->{$requestType}($amount) ->withCurrency(strtolower($order->getBaseCurrencyCode())) ->withClientTransactionId(time()) ->withAddress($address) @@ -231,7 +231,7 @@ public function refund(Varien_Object $payment, $amount) $customerId = $this->_getTxnCustomerId($order); try { - $refundResponse = Transaction::fromId($transactionId)->refund(str_replace(',', '', (string) $amount)) + $refundResponse = Transaction::fromId($transactionId)->refund($amount) ->withCurrency(strtolower($order->getBaseCurrencyCode())) ->withDescription($memo) ->withInvoiceNumber($invoiceNumber) diff --git a/composer.json b/composer.json index cae3a7d..451fa7c 100644 --- a/composer.json +++ b/composer.json @@ -13,6 +13,6 @@ "openmage-module" ], "require": { - "globalpayments/php-sdk": "^2.2" + "globalpayments/php-sdk": "dev-transit-amount-fix" } }