-
Notifications
You must be signed in to change notification settings - Fork 295
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
Add BTPayPalEditRequest and Tokenize for Edit FI #1358
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can at least mock out a few tests and in the implementation just add a TODO to implement in a future PR. For the BTPayPalEditRequest
we should be able to already add that test.
I'm working on the test function shells and one for |
/// - request: A `BTPayPalEditRequest` | ||
/// - completion: This completion will be invoked exactly once when tokenization is complete or an error occurs. | ||
/// - Warning: This feature is currently in beta and may change or be removed in future releases. | ||
public func tokenize( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to Jax's comment re: only supporting new features in Swift, what do folks think about only supporting new features in the async-await method syntax? We could hold on the completion style syntax and add it later based on merchant feedback? Is now a good time to trial this?
Would love folks thoughts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
People I've talked to are working with async-await syntax in their code bases, but that's just a small sampling. I'm sure there are a lot of companies with legacy repos.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a great point - i wonder how many merchants are transitioning to or already using the async/await style over the completion style syntax. imo i like that having both signatures gives merchants the choice to choose what works best for them but i also feel the asyn/await reads more clearly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed! I like the brevity of the async-await style lately too
I think V7 will be a good chance to yank the completion syntax 👀
CHANGELOG.md
Outdated
* BraintreePayPal | ||
* Add PayPal edit funding instrument flow (BETA) | ||
* Add `BTPayPalEditRequest` for edit FI flow | ||
* Add `tokenizetokenize(_:completion:)` method that takes in a `BTPayPalEditRequest` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Add `tokenizetokenize(_:completion:)` method that takes in a `BTPayPalEditRequest` | |
* Add `BTPayPalClient.tokenize(_:completion:)` method that takes in a `BTPayPalEditRequest` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Thank you
CHANGELOG.md
Outdated
@@ -1,5 +1,12 @@ | |||
# Braintree iOS SDK Release Notes | |||
|
|||
## unreleased | |||
* BraintreePayPal | |||
* Add PayPal edit funding instrument flow (BETA) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit (take it or leave it)
* Add PayPal edit funding instrument flow (BETA) | |
* Add PayPal Edit Funding Instrument Flow (BETA) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! 🚀 just left a few small comments
@@ -1380,6 +1384,7 @@ | |||
BE6BC22B2BA9C67600C3E321 /* BTPayPalVaultBaseRequest.swift */, | |||
BE349110294B77E100D2CF68 /* BTPayPalVaultRequest.swift */, | |||
62A659A32B98CB23008DFD67 /* PrivacyInfo.xcprivacy */, | |||
3B5CD9AF2C3C3FCC002EE8F7 /* BTPayPalEditRequest.swift */, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make sure these files are alphabetized?
Summary of changes
PayPalEditRequest
that takes in a Stringtoken
tokenize
function that takes inPayPalEditRequest
and returnsBTPayPalAccountNonce
orError
Checklist
Authors