-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Worldpay: Format non-fractional currency amounts correctly
#2084 introduced a regression to the Worldpay gateway wherein it was no longer implementing the correct contract for non-fractional currencies. Our [base gateway tests](https://github.com/jasonwebster/active_merchant/blob/07e28c4936c2ae46f0470d878c19f36564c3df6e/test/unit/gateways/gateway_test.rb#L83-L91) and [Stripe tests](https://github.com/jasonwebster/active_merchant/blob/07e28c4936c2ae46f0470d878c19f36564c3df6e/test/unit/gateways/stripe_test.rb#L431-L440) for example, which is another gateway with a `:cents` money format, ensure that you want to charge ¥100, you actually have to pass in `10000`, as if the non-fractional currency _was_ fractional. That's the external contract of Active Merchant--all transaction amounts accepted by the public API methods are expected to be in cents, period. Closes #2267
- Loading branch information
1 parent
e71cdd2
commit 022f85a
Showing
3 changed files
with
14 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters