How to redirect back to app from stripe's connected account form

Viewed 586

I'm trying to open my app after the user completes a form with stripe. https://stripe.com/docs/connect/collect-then-transfer-guide

I followed the deep link guide from android and it opens app from adb shell but when set in it stripe redirect it doesn't open app and getting site isn't reached. I added redirect url on stripe dashboard as well. Is there something else I need to do?

        binding.connectWithStripe.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                String redirect = "http://myapp/is";

                String url = "https://connect.stripe.com/express/oauth/authorize" +
                        "?client_id=" + "ca_Hy47YixynIKahDyA9AhL7gCQd5RhtNj5" +
                        "&state=" + 1234 +
                        "&redirect_uri=" + redirect;
                CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
                CustomTabsIntent customTabsIntent = builder.build();
                customTabsIntent.launchUrl(view.getContext(), Uri.parse(url));

            }
        });
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />

                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data android:scheme="http"
                    android:host="myapp"
                    android:pathPrefix="/" />

                <data android:scheme="myapp"
                    android:host="is" />

            </intent-filter>
        </activity>
0 Answers
Related