-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add GooglePayResult * Implement GooglePayResult * Fix unit tests for tokenize * Add GooglePayIsReadyToPayResult * Implement ready to pay result * Fix demo * Rename payment auth request * Add GooglePayPaymentAuthRequest * Implement GooglePayPaymentAuthRequest result * Fix unit tests * Fix demo app * Fix demo integration * Update CHANGELOG and migration guide * Add ready to pay to migration guide * Update GooglePay/src/main/java/com/braintreepayments/api/GooglePayClient.java Co-authored-by: sshropshire <[email protected]> * Convert error to cause * Revert error to cause changes * Update GooglePay/src/main/java/com/braintreepayments/api/GooglePayClient.java Co-authored-by: Holly Richko <[email protected]> * Update GooglePay/src/main/java/com/braintreepayments/api/GooglePayClient.java Co-authored-by: Holly Richko <[email protected]> * Fix spacing * Update v5_MIGRATION_GUIDE.md Co-authored-by: sshropshire <[email protected]> * Update v5_MIGRATION_GUIDE.md Co-authored-by: sshropshire <[email protected]> --------- Co-authored-by: sshropshire <[email protected]> Co-authored-by: Holly Richko <[email protected]>
- Loading branch information
1 parent
5633f12
commit 54f7f5d
Showing
19 changed files
with
290 additions
and
157 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
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
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
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
17 changes: 17 additions & 0 deletions
17
GooglePay/src/main/java/com/braintreepayments/api/GooglePayPaymentAuthRequest.kt
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,17 @@ | ||
package com.braintreepayments.api | ||
|
||
/** | ||
* A request used to launch the Venmo app for continuation of the Google Pay flow. | ||
*/ | ||
sealed class GooglePayPaymentAuthRequest { | ||
|
||
/** | ||
* The request was successfully created and is ready to be launched by [GooglePayLauncher] | ||
*/ | ||
class ReadyToLaunch(val requestParams: GooglePayPaymentAuthRequestParams) : GooglePayPaymentAuthRequest() | ||
|
||
/** | ||
* There was an [error] creating the request | ||
*/ | ||
class Failure(val error: Exception) : GooglePayPaymentAuthRequest() | ||
} |
5 changes: 1 addition & 4 deletions
5
GooglePay/src/main/java/com/braintreepayments/api/GooglePayPaymentAuthRequestCallback.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 |
---|---|---|
@@ -1,13 +1,10 @@ | ||
package com.braintreepayments.api; | ||
|
||
import androidx.annotation.Nullable; | ||
|
||
/** | ||
* Callback to handle result from | ||
* {@link GooglePayClient#createPaymentAuthRequest(GooglePayRequest, GooglePayPaymentAuthRequestCallback)} | ||
*/ | ||
public interface GooglePayPaymentAuthRequestCallback { | ||
|
||
void onResult(@Nullable GooglePayPaymentAuthRequest paymentAuthRequest, | ||
@Nullable Exception error); | ||
void onGooglePayPaymentAuthRequest(GooglePayPaymentAuthRequest paymentAuthRequest); | ||
} |
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
19 changes: 19 additions & 0 deletions
19
GooglePay/src/main/java/com/braintreepayments/api/GooglePayReadinessResult.kt
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,19 @@ | ||
package com.braintreepayments.api | ||
|
||
/** | ||
* Result of [GooglePayClient.isReadyToPay] | ||
*/ | ||
sealed class GooglePayReadinessResult { | ||
|
||
/** | ||
* The Google Pay API is supported and set up on this device. Show the Google Pay button for | ||
* Google Pay. | ||
*/ | ||
object ReadyToPay : GooglePayReadinessResult() | ||
|
||
/** | ||
* The Google Pay API is supported or not set up on this device, or there was an issue [error] | ||
* determining readiness. | ||
*/ | ||
class NotReadyToPay(val error: Exception?) : GooglePayReadinessResult() | ||
} |
Oops, something went wrong.