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

262 views Asked by At

As per the g-pay documentation for the web, they are providing a callback to set price dynamically on shipping address change but in android, no one has a callback.

In android, there has only one request functionality which gives a result in "onActivityResult" after the transaction like:

PaymentsClient paymentsClient = Wallet.getPaymentsClient(this, new Wallet.WalletOptions.Builder() .setEnvironment(getIntent().getIntExtra(EXTRA_ENVIRONMENT, WalletConstants.ENVIRONMENT_TEST)) .build());

PaymentDataRequest request =  PaymentDataRequest.fromJson(paymentDataRequestJson.get().toString());  
AutoResolveHelper.resolveTask(paymentsClient.loadPaymentData(request), this, REQUEST_CODE);

But I need one more callback to change the price dynamically before the transaction. please help me out with how can I achieve this dynamic functionality in android.

0

There are 0 answers