Last active
February 1, 2018 12:17
-
-
Save oyeb/9a299df95cc13a87324e321faca5c9b8 to your computer and use it in GitHub Desktop.
Some frequently used bindings for CAMS
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
# Handy bindings when developing the CAMS gateway integration. | |
# Most of the bindings are for the `opts` | |
# Instructions | |
# Just rename this file to `.iex.exs` and save it in either, | |
# 1. the gringotts root directory | |
# 2. your applications root directory | |
# essentially the place where you launch your `iex` sessions via `iex -S mix`. | |
alias Gringotts.{CreditCard, Response, Address} | |
alias Gringotts.Gateways.Cams | |
auth = %{ | |
username: "testintegrationc", | |
password: "password9" | |
} | |
address = %{ | |
name: "Jim Smith", | |
address1: "456 My Street", | |
address2: "Apt 1", | |
company: "Widgets Inc", | |
city: "Ottawa", | |
state: "ON", | |
zip: "K1C2N6", | |
country: "US", | |
phone: "(555)555-5555", | |
fax: "(555)555-6666" | |
} | |
opts = [config: auth, billing_address: address, order_id: 124] | |
card = %CreditCard{first_name: "Harry", | |
last_name: "Potter", | |
number: "4111111111111111", | |
year: 2099, | |
month: 12, | |
verification_code: "999", | |
brand: "VISA"} | |
money = Money.new(20, :USD) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment