Skip to content

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

Description

@chiragsharma991

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions