braintree / braintree-android-google-payment

Google Payment component for our Braintree AndroidSDK
MIT License
3 stars 10 forks source link

How to do dynamic payment update on change of shipping address in android. #19

Open chiragsharma991 opened 3 years ago

chiragsharma991 commented 3 years ago

As per the g-pay documentation in Braintree, there has only one request functionality which gives a result in "onPaymentMethodNonceCreated" after the transaction like:

GooglePaymentRequest googlePaymentRequest = new GooglePaymentRequest().transactionInfo(TransactionInfo.newBuilder() .setTotalPrice(total) .setTotalPriceStatus(WalletConstants.TOTAL_PRICE_STATUS_FINAL) .setCurrencyCode("USD") .build() .billingAddressRequired(true) .shippingAddressRequired(true) .phoneNumberRequired(true) .emailRequired(true) .billingAddressFormat(WalletConstants.BILLING_ADDRESS_FORMAT_FULL) .environment(com.flowerslib.utils.Constants.WebConstants.isProduction ? "PRODUCTION" : "TEST") // Optional in sandbox; if set in sandbox, this value must be a valid production Google Merchant ID .googleMerchantId(CheckoutConstant.merchantIdGooglePay); GooglePayment.requestPayment(mBraintreeFragment, googlePaymentRequest);

But I need one more callback to set price dynamically on shipping address change but in the document, no one has a callback. please give your suggestion on how can I achieve this dynamic functionality in android.

ioancretan commented 5 months ago

did you manage to find a sollution on this?