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

SEPA Launcher API [Tests] #814

Merged
merged 30 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
dbd7a3a
Add SEPADirectDebitBrowserSwitchResult class
scannillo Oct 30, 2023
0cf76e1
Add SEPADirectDebitLauncher.java and SEPADirectDebitLauncherCallback.…
scannillo Oct 30, 2023
149432a
Add SEPADirectDebitResponse.java
scannillo Oct 30, 2023
e883cdb
Add launch() and handleReturnToAppFromBrowser() methods to SEPADirect…
scannillo Oct 30, 2023
a60eb2d
WIP - add SEPADirectDebitFlowStartedCallback and begin migration of S…
scannillo Oct 30, 2023
0c987a9
Comment out SEPADirectDebitLifecycleObserver
scannillo Oct 30, 2023
fa7aedf
WIP - refactor Demo SEPADirectDebitFragment to use new launcher API
scannillo Oct 30, 2023
85da429
Add browserSwitchOptions to SEPADirectDebitResult & implement onResum…
scannillo Oct 31, 2023
6da3952
Remove unused getBrowserSwitchResult() and startBrowserSwitch() metho…
scannillo Oct 31, 2023
849b03b
Add SEPADirectDebitLauncher.java docstrings
scannillo Oct 31, 2023
1c69f80
Add docstrings for SEPADirectDebitClient.java
scannillo Oct 31, 2023
ce270e7
Add nonce to SEPADirectDebitResponse for use when mandate not require…
scannillo Oct 31, 2023
746c82f
Add docstrings to SEPADirectDebitFlowStartedCallback.java & add comme…
scannillo Oct 31, 2023
9da0a3f
Start SEPA migration guide entry
scannillo Oct 31, 2023
7ce4a97
Add initializer to BTSEPADirectDebitResponse
scannillo Oct 31, 2023
039571a
Cleanup
scannillo Oct 31, 2023
df5d6fd
Add CHANGELOG entry
scannillo Oct 31, 2023
d542165
Use lambda syntax in SEPA demo fragment
scannillo Nov 1, 2023
16d1fcd
PR Feedback - remove no-longer-needed Activity argument from SEPAClie…
scannillo Nov 1, 2023
90e5dff
Fixup - fix SEPAClient.tokenize() callsite to remove Activity arg
scannillo Nov 1, 2023
8a78c25
Delete SEPADirectDebitLifecycleObserverUnitTest.java
scannillo Nov 1, 2023
43f365f
WIP - begin updating SEPAClient unit tests
scannillo Nov 1, 2023
e6299b4
Add nullable annotations to SEPAResponse & nonce properties
scannillo Nov 1, 2023
beb346a
Add additional onBrowserSwitchResult() tests
scannillo Nov 1, 2023
e99fa8c
Add SEPADirectDebitLauncherUnitTest file & tests to mirror PPLauncher…
scannillo Nov 1, 2023
4b89d3b
Use verify() blocks in-place of callback
scannillo Nov 1, 2023
1e8fad4
Cleanup - remove extra newline from SEPALauncherTest
scannillo Nov 1, 2023
a1b0434
Move away from callback syntax for remaining SEPAClient unit tests
scannillo Nov 2, 2023
bd911a2
Remove extra test in SEPADirectDebitClientUnitTest
scannillo Nov 3, 2023
8614053
Merge branch 'sepa-launcer-api-refactor' into sepa-launcher-tests
scannillo Nov 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public void onBrowserSwitchResult(@NonNull SEPADirectDebitBrowserSwitchResult se

if (browserSwitchResult == null) {
callback.onResult(null, new BraintreeException("An unexpected error occurred."));
return;
}

int result = browserSwitchResult.getStatus();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ public interface SEPADirectDebitFlowStartedCallback {
* {@link SEPADirectDebitLauncher#launch(FragmentActivity, SEPADirectDebitResponse)}
* @param error an exception that occurred while initiating the SEPA transaction
*/
void onResult(SEPADirectDebitResponse sepaDirectDebitResponse, @Nullable Exception error);
void onResult(@Nullable SEPADirectDebitResponse sepaDirectDebitResponse, @Nullable Exception error);
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.braintreepayments.api;

import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentActivity;

/**
Expand Down Expand Up @@ -31,7 +32,7 @@ BrowserSwitchOptions getBrowserSwitchOptions() {
*
* @return {@link SEPADirectDebitNonce}
*/
public SEPADirectDebitNonce getNonce() {
public @Nullable SEPADirectDebitNonce getNonce() {
return this.sepaDirectDebitNonce;
}
}
Loading
Loading