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

Drop In wont able back to app #436

Closed Chaos2805 closed 1 year ago

Chaos2805 commented 1 year ago

Braintree SDK Version

6.11.0

Environment

Sandbox

Android Version & Device

No response

Braintree dependencies

[NA](com.braintreepayments.api:drop-in:6.11.0

Describe the bug

For my case, I upgrade drop-in SDK from 6.5.0 to 6.11.0, and i found that previously BraintreeClient will convert default params to lowercase, and now it removed. image In my application the applicationId contains capital letter, I think the scheme is not accepting capital case, since it prompt AppLinkUrlError if I put capital for android:scheme.

I found the BrainTreeClient constructor able to pass the custom url scheme, but on top DropInClient not able to modify the setting of BrainTreeClient image

To reproduce

Expected behavior

Should able back to app

Screenshots

No response

sshropshire commented 1 year ago

Hi @Chaos2805 thanks for using the Braintree SDK. For context, we stopped lowercasing the applicationId used for creating a custom URL scheme because capital letters are still valid URL characters according to RFC 2396.

Can you provide a snippet of your AndroidManifest.xml?

Chaos2805 commented 1 year ago

Original code before upgrade to 6.11.0

image

After upgrade to 6.11.0, it able redirect back to app after adding paypal but always return UserCanceled error.

And the main root cause i found is deeplink url = "com.project.whitecoat.braintree://onetouch/v1/success?token=EC-6FR52205SB437450R&ba_token=BA-1P1504025R832413F" and matchDeepLinkUrlScheme function using package name which is "com.project.WhiteCoat.braintree" img_v2_53b5a6d9-02f0-4c16-b8c7-22265322df9h

I wonder where to change the deeplink url return.

Chaos2805 commented 1 year ago

The success-url paased into browserSwitchRequest was with capped

Screenshot 2023-08-25 at 5 14 43 PM

but returned deeplink url was in small capital letter

image

@sshropshire

Chaos2805 commented 1 year ago

@sshropshire any update and able to fix it shortly? As we need update our app this week. Playstore required com.braintreepayments.api:data-collector update to atleast v4.31.0, but hit this issue after update it and make PayPal unable to function properly

Chaos2805 commented 1 year ago

@sarahkoop can you assist on this?

sarahkoop commented 1 year ago

@Chaos2805 We are working on a fix for this issue. We will post an update here when it's available.

Chaos2805 commented 1 year ago

@sshropshire @sarahkoop Can I get updates for this issue?

sshropshire commented 1 year ago

@Chaos2805 thanks for your patience. We'll be providing an update soon. In the meantime, you can preview our 4.37.1-SNAPSHOT release to ensure that the issue is resolved.

Chaos2805 commented 1 year ago

Hi @sshropshire , I tried 4.37.1-SNAPSHOT release and it working now

sarahkoop commented 1 year ago

Hi @Chaos2805 - This fix has been released in version 4.38.2 of the Braintree Android SDK and version 6.13.0 of the Drop-in SDK. Closing this as resolved but please re-open if you continue to experience issues!