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.
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.