Skip to content
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

Merged
merged 5 commits into from
Jan 25, 2018
Merged

[trexle] Adds Money protocol #84

merged 5 commits into from
Jan 25, 2018

Conversation

jyotigautam
Copy link
Member

@jyotigautam jyotigautam commented Jan 17, 2018

Uses Money.to_integer as Trexle works in cents.

  • token and message added to Response
  • fixed doc examples
  • removed unnecessary tests and mocks
    Ran the elixir 1.6 code formatter
    • Used ~s sigils in mocks

@oyeb oyeb changed the title Money protocol integration with trexle [trexle] Adds Money protocol and tests Jan 18, 2018
@jyotigautam jyotigautam changed the title [trexle] Adds Money protocol and tests [trexle] Adds Money protocol Jan 18, 2018
@@ -39,7 +39,7 @@ defmodule Gringotts.Gateways.Trexle do
use Gringotts.Gateways.Base
use Gringotts.Adapter, required_config: [:api_key, :default_currency]
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

@gopalshimpi gopalshimpi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@oyeb
Copy link
Contributor

oyeb commented Jan 22, 2018

The build failed due to ANet. Errors are fixed in #92.
Just rebase and rebuild this PR after merging #92.

@oyeb oyeb self-assigned this Jan 22, 2018
@oyeb oyeb added this to In progress in Gringotts [next-release] Jan 22, 2018
authorized a payment worth $10 by referencing the obtained `charge_token`.

```
iex> amount = %{value: Decimal.new(10, :USD)
Copy link
Member

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.


iex> Gringotts.capture(:payment_worker, Gringotts.Gateways.Trexle, token, amount)
```
iex> amount = %{value: Decimal.new(100, :USD)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here.

@oyeb oyeb added this to In progress in Gringotts [low-hanging-fruit] Jan 24, 2018
jyotigautam and others added 5 commits January 25, 2018 17:54
@pkrawat1 pkrawat1 merged commit 5e748e7 into dev Jan 25, 2018
@pkrawat1 pkrawat1 deleted the trexle_money branch January 25, 2018 13:09
pkrawat1 pushed a commit that referenced this pull request Jan 25, 2018
* Integrated Money protocol with trexle

* token and message added to Response

* Used `~s` sigils in mocks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants