java - 如何从条带的连接帐户表单重定向回应用程序
问题描述
在用户完成带有条纹的表单后,我正在尝试打开我的应用程序。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>
解决方案
推荐阅读
- javascript - 如何连接声音和图像
- asp.net-mvc - 如何更改 WebClient 类的标题?
- groovy - 如何在 Groovy 中声明一个字符串数组?
- sql-server - 如何自动备份 SQL 数据库,然后使用 SQL 命令删除超过 5 天的任何数据库
- sql - 从 SQL 查询返回的多维数组中删除一行
- c# - Unity - 连接水管的游戏。检查管道对象是否连接到中央源的问题
- windows - 为什么 fileformats 选项不适用于 vim 中的 ftplugin 文件?
- c# - 如何将评分系统分配给大型 if-else 语句 ASP.Net
- javascript - 如何与 Cypress 中带有 2 个手柄的价格滑块进行交互?
- javascript - 如何从 localhost 请求中尝试 IP 过滤器