-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[trexle] Adds Money protocol #84
Conversation
lib/gringotts/gateways/trexle.ex
Outdated
@@ -39,7 +39,7 @@ defmodule Gringotts.Gateways.Trexle do | |||
use Gringotts.Gateways.Base | |||
use Gringotts.Adapter, required_config: [:api_key, :default_currency] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oyeb since we are using money struct, is :default_currency
is still required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it's not required.Will remove it from required config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
lib/gringotts/gateways/trexle.ex
Outdated
authorized a payment worth $10 by referencing the obtained `charge_token`. | ||
|
||
``` | ||
iex> amount = %{value: Decimal.new(10, :USD) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a correct amount format here.
lib/gringotts/gateways/trexle.ex
Outdated
|
||
iex> Gringotts.capture(:payment_worker, Gringotts.Gateways.Trexle, token, amount) | ||
``` | ||
iex> amount = %{value: Decimal.new(100, :USD) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here.
* test cases modified
* token and message added to Response * fixed examples * removed unnecessary tests and mocks
* Used `~s` sigils in mocks
e9b5a95
to
e697091
Compare
* Integrated Money protocol with trexle * token and message added to Response * Used `~s` sigils in mocks
Uses
Money.to_integer
as Trexle works in cents.Response
Ran the elixir 1.6 code formatter
~s
sigils in mocks