diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a7ea43ee0..312bcb292c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## unreleased * GooglePay - * Bump `play-services-wallet` version to `19.1.0` + * Bump `play-services-wallet` version to `19.2.1` * Add `totalPriceLabel` to `GooglePayRequest` ## 4.39.0 (2023-10-16) diff --git a/Demo/src/main/java/com/braintreepayments/demo/GooglePayFragment.java b/Demo/src/main/java/com/braintreepayments/demo/GooglePayFragment.java index a245087fd6..29396045fb 100644 --- a/Demo/src/main/java/com/braintreepayments/demo/GooglePayFragment.java +++ b/Demo/src/main/java/com/braintreepayments/demo/GooglePayFragment.java @@ -20,6 +20,7 @@ import com.braintreepayments.api.GooglePayClient; import com.braintreepayments.api.GooglePayRequest; import com.google.android.gms.wallet.ShippingAddressRequirements; +import com.google.android.gms.wallet.TransactionInfo; import com.google.android.gms.wallet.WalletConstants; public class GooglePayFragment extends BaseFragment implements GooglePayListener { @@ -85,6 +86,11 @@ public void launchGooglePay(View v) { activity.setProgressBarIndeterminateVisibility(true); GooglePayRequest googlePayRequest = new GooglePayRequest(); + googlePayRequest.setTransactionInfo(TransactionInfo.newBuilder() + .setCurrencyCode(Settings.getGooglePayCurrency(activity)) + .setTotalPrice("1.00") + .setTotalPriceStatus(WalletConstants.TOTAL_PRICE_STATUS_FINAL) + .build()); googlePayRequest.setTotalPriceLabel("Braintree Demo Payment"); googlePayRequest.setAllowPrepaidCards(Settings.areGooglePayPrepaidCardsAllowed(activity)); googlePayRequest.setBillingAddressFormat(WalletConstants.BILLING_ADDRESS_FORMAT_FULL);