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

Braintree Blue: Partial capture #4515

Merged
merged 1 commit into from
Jul 27, 2022

Conversation

aenand
Copy link
Contributor

@aenand aenand commented Jul 27, 2022

Braintree blue can support partial captures for certain
types of transactions. This commit adds logic to handle partial capture
logic if the partial_capture field is passed down.

Test Summary
Local:
5269 tests, 76156 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
746 files inspected, no offenses detected
Unit:
92 tests, 204 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
Remote:
98 tests, 530 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

@aenand aenand requested a review from a team July 27, 2022 12:48
Copy link

@tatsianaclifton tatsianaclifton left a comment

Choose a reason for hiding this comment

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

It looks good, but I think we should add remote tests for partial capture.

@aenand
Copy link
Contributor Author

aenand commented Jul 27, 2022

@tatsianaclifton I didn't add a remote test for partial capture because the Braintree docs mentioned it is only available for Paypal and Venmo transactions and I don't think those auths are added in AM yet. Are they in AM?

https://developer.paypal.com/braintree/docs/reference/request/transaction/submit-for-partial-settlement

@tatsianaclifton
Copy link

@tatsianaclifton I didn't add a remote test for partial capture because the Braintree docs mentioned it is only available for Paypal and Venmo transactions and I don't think those auths are added in AM yet. Are they in AM?

https://developer.paypal.com/braintree/docs/reference/request/transaction/submit-for-partial-settlement

PayPal and Venmo should work for purchase and since purchase just calls authorization I would assume nothing needs to be modified for authorization to accept PayPal and Venmo. However, I don't see any remote tests added to that, not sure what the reason. Maybe Braintree sandbox doesn't allow testing for that.

@aenand
Copy link
Contributor Author

aenand commented Jul 27, 2022

@tatsianaclifton good to know! I'll look into that later and see if it works

@molbrown
Copy link
Contributor

I think all you would need is a Venmo/ Paypal nonce? Those are available here for testing: https://developer.paypal.com/braintree/docs/reference/general/testing#nonces-representing-alternative-payment-methods

@aenand aenand force-pushed the ECS-2542_add_partial_capture_to_braintree_blue branch from 856f881 to 8042e3c Compare July 27, 2022 15:06
@aenand
Copy link
Contributor Author

aenand commented Jul 27, 2022

@tatsianaclifton @molbrown thanks for those resources! I was able to add a successful partial capture remote test.

Copy link

@tatsianaclifton tatsianaclifton left a comment

Choose a reason for hiding this comment

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

LGTM

Braintree blue can support partial captures for certain
types of transactions. This commit adds logic to handle partial capture
logic if the `partial_capture` field is passed down.

Test Summary
Local:
5269 tests, 76156 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
746 files inspected, no offenses detected
Unit:
92 tests, 204 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
Remote:
99 tests, 538 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
@aenand aenand force-pushed the ECS-2542_add_partial_capture_to_braintree_blue branch from 8042e3c to e011f28 Compare July 27, 2022 18:54
@aenand aenand merged commit 4e689f5 into master Jul 27, 2022
@aenand aenand deleted the ECS-2542_add_partial_capture_to_braintree_blue branch July 27, 2022 18:55
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.

3 participants