适用于Android的Square Web API杀死应用程序

问题描述 投票:0回答:1

https://docs.connect.squareup.com/articles/web-api-android上发现以下文档之后,我无法通过android请求与方形阅读器建立成功连接

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

在dev服务器(127.0.0.1)上激活的示例链接是: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

非接触式固件,芯片阅读器是2.9.36,通过蓝牙连接到Android设备。

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

android square-connect
1个回答
0
投票

为了解决这个问题,问题是缺少在Square Developer Portal中注册的Web回调URL。

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

为了使Square Point of Sale接受来自您网站的请求,Square需要验证您是否已在Application Dashboard中为该应用程序注册了Web回调URI。

首先,转到Application Dashboard,然后单击应用程序设置的Point of Sale API选项卡。在“Web”部分下,在相应字段下指定应用程序的Web回调URI。

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

© www.soinside.com 2019 - 2024. All rights reserved.