首页 > 解决方案 > 如何从条带的连接帐户表单重定向回应用程序

问题描述

在用户完成带有条纹的表单后,我正在尝试打开我的应用程序。https://stripe.com/docs/connect/collect-then-transfer-guide

我遵循了来自 android 的深层链接指南,它从 adb shell 打开了应用程序,但是当在其中设置条带重定向时,它不会打开应用程序并且无法访问站点。我也在条纹仪表板上添加了重定向网址。还有什么我需要做的吗?

        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>

标签: javaandroidstripe-payments

解决方案


推荐阅读