Hi everyone,
Is there any tutorial or example, of how to use the Braintree library?
alias Braintree.Customer
alias Braintree.ErrorResponse, as: Error
case Customer.create(%{company: "Whale Corp"}) do
{:ok, %Customer{} = customer} -> do_stuff_with_customer(customer)
{:error, %Error{} = error} -> do_stuff_with_error(error)
end
What can I do here?
do_stuff_with_customer(customer)
I need the customer the amount and the country
PS: I can’t use stripe because it is unavailable in my country.
UPDATE: For anybody else that wants to use this, some examples can be found in the repo inside files so for payments you can find them in transactions.ex, here is the link https://github.com/sorentwo/braintree-elixir/blob/master/lib/transaction.ex
Thanks in advance for any tips or help on this.