Skip to content

Commit

Permalink
Add Google Pay Direct Integration (#972)
Browse files Browse the repository at this point in the history
* Make direct Google Pay integration method public
  • Loading branch information
sarahkoop authored Apr 11, 2024
1 parent 6da53c2 commit c670608
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Braintree Android SDK Release Notes

## unreleased

* Google Pay
* Add `GooglePayClient#tokenize(PaymentData, GooglePayOnActivityResultCallback)` to be invoked after direct Google Play Services integration

## 4.44.0 (2024-04-05)

* Local Payment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,15 +332,15 @@ public void onResult(@Nullable Configuration configuration, @Nullable Exception
}

/**
* This method is called when you've received a successful {@link PaymentData} response in
* {@link GooglePayClient#onActivityResult(int, Intent, GooglePayOnActivityResultCallback)}
* to get a {@link GooglePayCardNonce} or {@link PayPalAccountNonce}.
* Call this method when you've received a successful {@link PaymentData} response from a
* direct Google Play Services integration to get a {@link GooglePayCardNonce} or
* {@link PayPalAccountNonce}.
*
* @param paymentData {@link PaymentData} from the Intent in
* {@link GooglePayClient#onActivityResult(int, Intent, GooglePayOnActivityResultCallback)} method.
* @param paymentData {@link PaymentData} retrieved from directly integrating with Google Play
* Services through {@link PaymentsClient#loadPaymentData(PaymentDataRequest)}
* @param callback {@link GooglePayOnActivityResultCallback}
*/
void tokenize(PaymentData paymentData, GooglePayOnActivityResultCallback callback) {
public void tokenize(PaymentData paymentData, GooglePayOnActivityResultCallback callback) {
try {
JSONObject result = new JSONObject(paymentData.toJson());
callback.onResult(GooglePayCardNonce.fromJSON(result), null);
Expand Down

0 comments on commit c670608

Please sign in to comment.