Skip to content

Commit

Permalink
provide fix for amount via sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
slogsdon committed Jan 29, 2021
1 parent 0e310cf commit ea9517c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/code/community/Hps/Transit/Model/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"openmage-module"
],
"require": {
"globalpayments/php-sdk": "^2.2"
"globalpayments/php-sdk": "dev-transit-amount-fix"
}
}

0 comments on commit ea9517c

Please sign in to comment.