-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
570 additions
and
431 deletions.
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
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
...rectDebit/src/main/java/com/braintreepayments/api/SEPADirectDebitBrowserSwitchResult.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 SEPA mandate web flow through {@link SEPADirectDebitBrowserSwitchResultCallback}. | ||
* This result should be passed to | ||
* {@link SEPADirectDebitClient#onBrowserSwitchResult(SEPADirectDebitBrowserSwitchResult, SEPADirectDebitBrowserSwitchResultCallback)} )} | ||
* to complete the SEPA mandate flow. | ||
*/ | ||
public class SEPADirectDebitBrowserSwitchResult { | ||
|
||
private BrowserSwitchResult browserSwitchResult; | ||
private Exception error; | ||
|
||
SEPADirectDebitBrowserSwitchResult(BrowserSwitchResult browserSwitchResult) { | ||
this.browserSwitchResult = browserSwitchResult; | ||
} | ||
|
||
SEPADirectDebitBrowserSwitchResult(Exception error) { | ||
this.error = error; | ||
} | ||
|
||
BrowserSwitchResult getBrowserSwitchResult() { | ||
return browserSwitchResult; | ||
} | ||
|
||
Exception getError() { | ||
return error; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
...t/src/main/java/com/braintreepayments/api/SEPADirectDebitBrowserSwitchResultCallback.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,16 @@ | ||
package com.braintreepayments.api; | ||
|
||
import androidx.annotation.Nullable; | ||
|
||
/** | ||
* Callback for receiving result of | ||
* {@link SEPADirectDebitClient#onBrowserSwitchResult(SEPADirectDebitBrowserSwitchResult, SEPADirectDebitBrowserSwitchResultCallback)}. | ||
*/ | ||
public interface SEPADirectDebitBrowserSwitchResultCallback { | ||
|
||
/** | ||
* @param sepaDirectDebitNonce {@link SEPADirectDebitNonce} | ||
* @param error an exception that occurred while processing a PayPal result | ||
*/ | ||
void onResult(@Nullable SEPADirectDebitNonce sepaDirectDebitNonce, @Nullable Exception error); | ||
} |
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
20 changes: 20 additions & 0 deletions
20
...rectDebit/src/main/java/com/braintreepayments/api/SEPADirectDebitFlowStartedCallback.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,20 @@ | ||
package com.braintreepayments.api; | ||
|
||
import androidx.annotation.Nullable; | ||
import androidx.fragment.app.FragmentActivity; | ||
|
||
/** | ||
* Callback for receiving result of | ||
* {@link SEPADirectDebitClient#tokenize(SEPADirectDebitRequest, SEPADirectDebitFlowStartedCallback)}. | ||
*/ | ||
public interface SEPADirectDebitFlowStartedCallback { | ||
|
||
/** | ||
* @param sepaDirectDebitResponse the result of the SEPA create mandate call. If a nonce is present, | ||
* no web-based mandate is required. If a nonce is not present, | ||
* you must trigger the web-based mandate flow via | ||
* {@link SEPADirectDebitLauncher#launch(FragmentActivity, SEPADirectDebitResponse)} | ||
* @param error an exception that occurred while initiating the SEPA transaction | ||
*/ | ||
void onResult(@Nullable SEPADirectDebitResponse sepaDirectDebitResponse, @Nullable Exception error); | ||
} |
Oops, something went wrong.