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

[SecurionPay] Implemented purchase/3 #143

Open
wants to merge 1 commit into
base: securion-pay
Choose a base branch
from

Conversation

radewoosh
Copy link

SecurionPay
===========

`purchasee/3`
---------------
* Implemented two `purchase` clauses:
  - `CreditCard` struct (a `card_id` is NOT generated)
  - `card_id` (`customer_id` must be provided in `opts`)
* Does not support optional arguments like shipping, billing etc.
* In both cases, the Gateway API is hit only ONCE.

Docs
----
* Added docs for `purchase/3`.

Tests
-----
* Added integration tests for `purchase/3`, uing ExVCR.

    SecurionPay
    ===========

    `purchasee/3`
    ---------------
    * Implemented two `purchase` clauses:
      - `CreditCard` struct (a `card_id` is NOT generated)
      - `card_id` (`customer_id` must be provided in `opts`)
    * Does not support optional arguments like shipping, billing etc.
    * In both cases, the Gateway API is hit only ONCE.

    Docs
    ----
    * Added docs for `purchase/3`.

    Tests
    -----
    * Added integration tests for `purchase/3`, uing ExVCR.
end
end

test "with card_id but no customer_id" do
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this check perhaps happen on our side, without making a network request?

iex> amount = Money.new(20, :USD)
iex> opts = [customer_id: "cust_9999999999999999999999999"]
iex> card = "card_999999999999999"
iex> result = Gringotts.Gateways.SecurionPay.purchase(amount, card, opts)
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't call your module directly in doc examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants