braintree / braintree-android-drop-in

Braintree Drop-In SDK for Android
https://developers.braintreepayments.com/guides/drop-in/android/v2
MIT License
124 stars 78 forks source link

Get ClientMetaDataId without authorization #385

Closed skauss closed 1 year ago

skauss commented 1 year ago

Hi, I need to migrate from drop-in SDK Version 6.4.0 to Version 6.7.0

In the Version 6.4.0 I was able to get the ClientMetaDataId like this

String clientMetadataId = DataCollector.getPayPalClientMetadataId(activity.getApplicationContext()); // Tip from Pedro

In the Version 6.7.0 this is not available any more.

I am able to create the BrowserSwitch in the staging environment with a fake clientMetadataId

clientMetaDataId = UUID.randomUUID().toString();

But this didn't work in production.

In our Braintree Flow (called PayPalPlus) (Creditcard with installments ) the Native Mobile App Application need to provide the clientMetadataId to our JavaScript Checkout and Payment application which run inside an Android (or iOS) WebView.

You will found a flow in https://github.com/braintree/braintree_android/issues/634

This is the way I start the BrowserSwitch

   BrowserSwitchOptions browserSwitchOptions = new BrowserSwitchOptions();
   browserSwitchOptions.returnUrlScheme( urlScheme );
   browserSwitchOptions.url( Uri.parse( urlToLoad )); 

   browserSwitchClient = new BrowserSwitchClient();
   browserSwitchClient.start(activity,browserSwitchOptions);

Please let me know how to create an clientMetadatID for our payment flow.

Regards Stephan

skauss commented 1 year ago

Braintree Support of Brasil promise a clientMetaDataId = UUID.randomUUID().toString(); would work in production for PayPalPlus.

sshropshire commented 1 year ago

Hey @skauss apologies for the late response. We're still prioritizing some outstanding issues on the Android side. Was this resolved on your end?

skauss commented 1 year ago

Hi @sshropshire
It end now in a new request. see https://github.com/braintree/browser-switch-android/issues/62