Current section
20 Versions
Jump to
Current section
20 Versions
Compare versions
11
files changed
+91
additions
-34
deletions
| @@ -1,3 +1,16 @@ | |
| 1 | + ## v0.11.0 2020-05-11 |
| 2 | + |
| 3 | + * [Braintree] Allow configuration of sandbox endpoint for testing |
| 4 | + * [Braintree.CreditCard] Include `billing_address` with the `CreditCard` struct |
| 5 | + * [Braintree.Transaction] Add support for `android_pay_card` and correct field |
| 6 | + names to match `android_pay_card` and `apple_pay` |
| 7 | + * [Braintree.Transaction] Rename `customer_details` to `customer` to correctly |
| 8 | + reflect API results. |
| 9 | + * [Braintree.Search] Fix `perform` so that it correctly handles transaction |
| 10 | + results |
| 11 | + * [Braintree.TestTransaction] Make TestTransaction available in all |
| 12 | + environments. |
| 13 | + |
| 1 14 | ## v0.10.0 2019-03-26 |
| 2 15 | |
| 3 16 | ### Enhancements |
| @@ -143,6 +143,18 @@ testing][plp]. | |
| 143 143 | [dtc]: https://articles.braintreepayments.com/control-panel/transactions/duplicate-checking |
| 144 144 | [plp]: https://developers.braintreepayments.com/guides/paypal/testing-go-live/php#linked-paypal-testing |
| 145 145 | |
| 146 | + ### Testing Using Only `localhost` |
| 147 | + |
| 148 | + You can optionally configure the sandbox endpoint url to point towards a local url and |
| 149 | + port for testing which does not need to call out to the Braintree sandbox API. |
| 150 | + For example, in your `config.exs` |
| 151 | + ``` |
| 152 | + config :braintree, :sandbox_endpoint, "localhost:4001" |
| 153 | + ``` |
| 154 | + In conjuction with a libary such as [`Bypass`](https://github.com/PSPDFKit-labs/bypass) |
| 155 | + you can use this config to define test-specific returns from `Braintree` calls without |
| 156 | + hitting the Braintree sandbox API. |
| 157 | + |
| 146 158 | ## License |
| 147 159 | |
| 148 160 | MIT License, see [LICENSE.txt](LICENSE.txt) for details. |
| @@ -3,22 +3,21 @@ | |
| 3 3 | {<<"description">>,<<"Native Braintree client library for Elixir">>}. |
| 4 4 | {<<"elixir">>,<<"~> 1.5">>}. |
| 5 5 | {<<"files">>, |
| 6 | - [<<"lib">>,<<"lib/add_on.ex">>,<<"lib/address.ex">>,<<"lib/braintree.ex">>, |
| 7 | - <<"lib/client_token.ex">>,<<"lib/construction.ex">>, |
| 8 | - <<"lib/credit_card.ex">>,<<"lib/credit_card_verification.ex">>, |
| 9 | - <<"lib/customer.ex">>,<<"lib/discount.ex">>,<<"lib/error_response.ex">>, |
| 10 | - <<"lib/http.ex">>,<<"lib/merchant">>,<<"lib/merchant/account.ex">>, |
| 11 | - <<"lib/merchant/business.ex">>,<<"lib/merchant/funding.ex">>, |
| 12 | - <<"lib/merchant/individual.ex">>,<<"lib/payment_method.ex">>, |
| 13 | - <<"lib/payment_method_nonce.ex">>,<<"lib/paypal_account.ex">>, |
| 14 | - <<"lib/plan.ex">>,<<"lib/search.ex">>,<<"lib/settlement_batch_summary.ex">>, |
| 15 | - <<"lib/subscription.ex">>,<<"lib/testing">>, |
| 16 | - <<"lib/testing/credit_card_numbers.ex">>,<<"lib/testing/nonces.ex">>, |
| 17 | - <<"lib/testing/test_transaction.ex">>,<<"lib/transaction.ex">>, |
| 18 | - <<"lib/transaction_line_item.ex">>,<<"lib/util.ex">>,<<"lib/xml">>, |
| 19 | - <<"lib/xml/decoder.ex">>,<<"lib/xml/encoder.ex">>,<<"lib/xml/entity.ex">>, |
| 20 | - <<"priv">>,<<"priv/certs">>, |
| 21 | - <<"priv/certs/api_braintreegateway_com.ca.crt">>,<<"priv/entities.txt">>, |
| 6 | + [<<"lib">>,<<"lib/transaction.ex">>,<<"lib/credit_card_verification.ex">>, |
| 7 | + <<"lib/paypal_account.ex">>,<<"lib/construction.ex">>,<<"lib/util.ex">>, |
| 8 | + <<"lib/braintree.ex">>,<<"lib/settlement_batch_summary.ex">>, |
| 9 | + <<"lib/address.ex">>,<<"lib/plan.ex">>,<<"lib/payment_method.ex">>, |
| 10 | + <<"lib/add_on.ex">>,<<"lib/credit_card.ex">>,<<"lib/subscription.ex">>, |
| 11 | + <<"lib/xml">>,<<"lib/xml/encoder.ex">>,<<"lib/xml/decoder.ex">>, |
| 12 | + <<"lib/xml/entity.ex">>,<<"lib/error_response.ex">>,<<"lib/customer.ex">>, |
| 13 | + <<"lib/testing">>,<<"lib/testing/test_transaction.ex">>, |
| 14 | + <<"lib/testing/nonces.ex">>,<<"lib/testing/credit_card_numbers.ex">>, |
| 15 | + <<"lib/transaction_line_item.ex">>,<<"lib/payment_method_nonce.ex">>, |
| 16 | + <<"lib/http.ex">>,<<"lib/client_token.ex">>,<<"lib/search.ex">>, |
| 17 | + <<"lib/discount.ex">>,<<"lib/merchant">>,<<"lib/merchant/funding.ex">>, |
| 18 | + <<"lib/merchant/account.ex">>,<<"lib/merchant/business.ex">>, |
| 19 | + <<"lib/merchant/individual.ex">>,<<"priv">>,<<"priv/entities.txt">>, |
| 20 | + <<"priv/certs">>,<<"priv/certs/api_braintreegateway_com.ca.crt">>, |
| 22 21 | <<"mix.exs">>,<<"README.md">>,<<"CHANGELOG.md">>]}. |
| 23 22 | {<<"licenses">>,[<<"MIT">>]}. |
| 24 23 | {<<"links">>, |
| @@ -30,4 +29,4 @@ | |
| 30 29 | {<<"optional">>,false}, |
| 31 30 | {<<"repository">>,<<"hexpm">>}, |
| 32 31 | {<<"requirement">>,<<"~> 1.15">>}]]}. |
| 33 | - {<<"version">>,<<"0.10.0">>}. |
| 32 | + {<<"version">>,<<"0.11.0">>}. |
| @@ -1,7 +1,7 @@ | |
| 1 1 | defmodule Braintree do |
| 2 2 | @moduledoc """ |
| 3 3 | A native Braintree client library for Elixir. Only a subset of the API is |
| 4 | - supported and this is a work in progress. That said, it is already uned in |
| 4 | + supported and this is a work in progress. That said, it is already used in |
| 5 5 | production, and any modules that have been implemented can be used. |
| 6 6 | |
| 7 7 | For general reference please see: |
| @@ -5,9 +5,11 @@ defmodule Braintree.CreditCard do | |
| 5 5 | """ |
| 6 6 | |
| 7 7 | use Braintree.Construction |
| 8 | + alias Braintree.Address |
| 8 9 | |
| 9 10 | @type t :: %__MODULE__{ |
| 10 11 | bin: String.t(), |
| 12 | + billing_address: Address.t(), |
| 11 13 | card_type: String.t(), |
| 12 14 | cardholder_name: String.t(), |
| 13 15 | commercial: String.t(), |
| @@ -36,6 +38,7 @@ defmodule Braintree.CreditCard do | |
| 36 38 | } |
| 37 39 | |
| 38 40 | defstruct bin: nil, |
| 41 | + billing_address: nil, |
| 39 42 | card_type: nil, |
| 40 43 | cardholder_name: nil, |
| 41 44 | commercial: "Unknown", |
Loading more files…