-
Notifications
You must be signed in to change notification settings - Fork 237
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
PayPal Launcher API #807
Merged
Merged
PayPal Launcher API #807
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
3e298a6
Bump java to 11
sarahkoop 614a291
Update lambdas in card
sarahkoop 7118205
Update demo to java 11
sarahkoop 5353f99
Update localpayment to java 11
sarahkoop baa124a
Reformat PayPal
sarahkoop 3ca6266
Cleanup PayPalNativeCheckout
sarahkoop 149d823
Cleanup SEPA
sarahkoop 3a3d5eb
Cleanup SharedUtils
sarahkoop 9820cb6
Cleanup TestUtils
sarahkoop 96b6a6b
Cleanup Venmo
sarahkoop 6af8006
Remove java 8 references
sarahkoop 1bab0c1
Reformat VisaCheckout
sarahkoop 2302dc9
Reformat
sarahkoop b165952
reformat 3ds
sarahkoop 80d248f
Update CHANGELOG an README
sarahkoop 566e680
reformat Amex
sarahkoop 28b07c7
create PayPalLauncher
sarahkoop 4b52c10
Remove listener
sarahkoop 45ec0c0
Merge branch 'v5' into paypal_launcher_api
sarahkoop b598fb1
Add launcher flow
sarahkoop 55b2e45
Fix merge conflicts
sarahkoop 86a0553
Fix demo integration
sarahkoop 2e9734e
Fix exception handling
sarahkoop 5099be4
fix unit tests
sarahkoop ea42c27
Update integration tests
sarahkoop cd1576f
Add PayPalLauncher unit tests
sarahkoop 185612e
Update java docs
sarahkoop 45a9472
Add CHANGELOG
sarahkoop 51839cf
add migration guide
sarahkoop f74fb0e
clarify docs
sarahkoop 7d3cf8d
Reformat files
sarahkoop 9ddcffc
Add try catch to docs
sarahkoop acf051b
Merge branch 'v5' into paypal_launcher_api
sarahkoop 57d2eeb
Merge branch 'v5' into paypal_launcher_api
sarahkoop 2c01463
Refactor launcher and error handling
sarahkoop e92e425
Update migration guide
sarahkoop 6fcd6ec
Update migration guide
sarahkoop 5f93a2e
Add CHANGELOG
sarahkoop 19ef68f
Update v5_MIGRATION_GUIDE.md
sarahkoop 8f1c394
Merge branch 'v5' into paypal_launcher_api
sarahkoop 3369e0b
Merge v5
sarahkoop b61c9ff
Fix docstring
sarahkoop eae3774
Fix CHANGELOG
sarahkoop f1608b2
Add docstring
sarahkoop 0fe142b
Update CHANGELOG.md
sarahkoop File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 0 additions & 59 deletions
59
Demo/src/androidTest/java/com/braintreepayments/demo/test/PayPalManualBrowserSwitchTest.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
PayPal/src/main/java/com/braintreepayments/api/PayPalBrowserSwitchResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.braintreepayments.api; | ||
|
||
/** | ||
* Result received from the PayPal web flow through {@link PayPalBrowserSwitchResultCallback}. | ||
* This result should be passed to | ||
* {@link PayPalClient#onBrowserSwitchResult(PayPalBrowserSwitchResult, PayPalBrowserSwitchResultCallback)} | ||
* to complete the PayPal payment flow. | ||
*/ | ||
public class PayPalBrowserSwitchResult { | ||
|
||
private BrowserSwitchResult browserSwitchResult; | ||
private Exception error; | ||
|
||
PayPalBrowserSwitchResult(BrowserSwitchResult browserSwitchResult) { | ||
this.browserSwitchResult = browserSwitchResult; | ||
} | ||
|
||
PayPalBrowserSwitchResult(Exception error) { | ||
this.error = error; | ||
} | ||
|
||
BrowserSwitchResult getBrowserSwitchResult() { | ||
return browserSwitchResult; | ||
} | ||
|
||
Exception getError() { | ||
return error; | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Do these need to be public w/ docstrings?
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.
No the idea with this result object is that the merchant doesn't have to do anything with it / be aware of any params and just passes it directly to the
PayPalClient#onBrowserSwitchResult
method, which will then handle any errors and call them back to the merchant. We could break it up and allow merchants to handle errors at each step, but this seems cleaner for integrations