Square Web API for Android 杀死应用程序

Square Web API for Android Kills App

在遵循 https://docs.connect.squareup.com/articles/web-api-android

中的文档后,我无法通过 android 请求成功连接广场 reader

这看起来很简单,但连接 link 最终导致应用程序崩溃或导致应用程序重新启动,而没有向 S.browser_fallback_urlS.com.squareup.pos.WEB_CALLBACK_URI 发送任何错误报告或回调信息。

在开发服务器 (127.0.0.1) 上激活的示例 link 是:intent:#Intent;action=com.squareup.pos.action.CHARGE;package=com.squareup;S.browser_fallback_url=http://localhost:8080/tb/square;S.com.squareup.pos.WEB_CALLBACK_URI=http://localhost:8080/tb/square;S.com.squareup.pos.CLIENT_ID=secret;S.com.squareup.pos.API_VERSION=v2.0;i.com.squareup.pos.TOTAL_AMOUNT=150;S.com.squareup.pos.CURRENCY_CODE=USD;S.com.squareup.pos.TENDER_TYPES=com.squareup.pos.TENDER_CARD,com.squareup.pos.TENDER_CARD_ON_FILE,com.squareup.pos.TENDER_CASH,com.squareup.pos.TENDER_OTHER;S.com.squareup.pos.REQUEST_METADATA=5a982466e7b46;S.com.squareup.pos.NOTE=This will be a note!;end

对于 CLIENT_ID,我被指示使用在 https://connect.squareup.com/apps/

找到的应用程序 ID

非接触式固件,芯片 reader 是 2.9.36,它通过蓝牙连接到 android 设备。

--编辑-- 第一次通过 https://ibb.co/kSBUYH https://ibb.co/fyUGDH 第二次通过 https://ibb.co/duFZ0x https://ibb.co/i1MUYH

为了在评论中提出这个问题,这个问题缺少在 Square Developer Portal 中注册的网络回调 URL。

You want to be sure to register your callback URL(s)

In order for Square Point of Sale to accept a request from your website, Square needs to verify that you have registered a web callback URI for the application in the Application Dashboard.

First, go to the Application Dashboard, then click on the Point of Sale API tab of your application's settings. Under the Web section, specify your app's web callback URI under the corresponding field.

If your transaction does not succeed for any reason, you should be receiving a error back to you.