Skip to content

Commit

Permalink
Update HiTrust notification to return a float string for gross
Browse files Browse the repository at this point in the history
git-svn-id: https://activemerchant.googlecode.com/svn/trunk/active_merchant@651 6513ea26-6c20-0410-8a68-89cd7235086d
  • Loading branch information
codyfauser committed Mar 11, 2008
1 parent f84c771 commit 66791a7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
= ActiveMerchant CHANGELOG

* Fix gross in HiTrust notification. Don't use Money object in Verifi gateway [cody]
* Initial implementation of Payflow Name-Value API [Greg Furmanek]
* Add support for CyberSource credits [mjuneja]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ def currency
end

def gross
params['approveamount']
sprintf("%.2f", gross_cents.to_f / 100)
end

def gross_cents
gross.to_i
params['approveamount'].to_i
end

def account
Expand Down
1 change: 0 additions & 1 deletion test/unit/gateways/verifi_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def test_unsuccessful_request
end

def test_amount_style
assert_equal '10.34', @gateway.send(:amount, Money.new(1034))
assert_equal '10.34', @gateway.send(:amount, 1034)

assert_raise(ArgumentError) do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def test_accessors
assert_equal "012345678901", @notification.transaction_id
assert_equal "1000", @notification.item_id
assert_equal "101010", @notification.account
assert_equal "500", @notification.gross
assert_equal "5.00", @notification.gross
assert_equal "USD", @notification.currency
assert_equal Time.parse("2007-12-01.12.35.40.123456"), @notification.received_at
assert @notification.test?
Expand Down

0 comments on commit 66791a7

Please sign in to comment.