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

Support vaulted ApplePay #94

Merged
merged 3 commits into from
Aug 14, 2020
Merged

Support vaulted ApplePay #94

merged 3 commits into from
Aug 14, 2020

Conversation

balexand
Copy link
Contributor

This adds support for vaulted Apple Pay payment methods. Braintree.PaymentMethod.create/2 can now be called with an Apple Pay nonce. Also, the Braintree.Customer struct now includes an apple_pay_cards field.

I was not able to get the complete integration test suite to pass, but the integration tests in test/integration/payment_method_test.exs worked for me. I added an integration test to this file covering Braintree.PaymentMethod.create/2.

Please let me know if there's anything that you'd like changed.

Thanks ✨

@balexand
Copy link
Contributor Author

balexand commented Aug 13, 2020

The docs for ApplePayCard can be found here: https://developers.braintreepayments.com/reference/response/apple-pay-card/ruby

I've only included documented fields in the Braintree.ApplePayCard struct. The exception to this is billing_address, which is missing from Braintree's docs but is present in the JSON returned by Braintree.

@sorentwo sorentwo merged commit 33eb555 into sorentwo:master Aug 14, 2020
@sorentwo
Copy link
Owner

Thanks for the improvements @balexand. Everything looks great. Don't sweat the full test suite, from what sources at Braintree have told me that is an issue that they face as well. Rate limiting and integration testing is a poor combination.

@balexand balexand deleted the customer_apple_pay branch August 14, 2020 23:30
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