【问题标题】:Square PoS Android Web auto_returnSquare PoS Android Web auto_return
【发布时间】:2019-01-09 16:58:00
【问题描述】:

我正在尝试构建一个用于在 Android 设备上启动付款的 Web 应用程序。我通过放置一个按钮并使用 Intent 模式和 javascript 来做到这一点。它看起来像这样:

var intent = "intent:#Intent;action=com.squareup.pos.action.CHARGE;package=com.squareup;S.browser_fallback_url=" + payment.fallback_url + ";S.com.squareup.pos.WEB_CALLBACK_URI=" + payment.callback_url + ";S.com.squareup.pos.CLIENT_ID=" + payment.client_id + ";S.com.squareup.pos.API_VERSION=v2.0;i.com.squareup.pos.TOTAL_AMOUNT=" + payment.total_amount + ";S.com.squareup.pos.CURRENCY_CODE=" + payment.currency_code + ";S.com.squareup.pos.TENDER_TYPES=com.squareup.pos.TENDER_CARD;end"

该过程应尽可能顺畅,因此我想跳过收据,并在交易完成后立即自动返回我的应用程序。使用additional payment options 看起来这在 iOS 中是可能的 - 但我不知道这在 Android 中是否可用。

有没有办法从网络应用程序传递这个选项?

【问题讨论】:

    标签: javascript square-connect


    【解决方案1】:

    Android 上还没有用于在 POS API 中跳过收据的选项。但是,您可以通过登录到销售点,导航到设置 -> 签名和收据并切换“跳过收据屏幕”选项来启用在每台设备上跳过收据。

    【讨论】:

    • auto_return 也是这样吗? (交易完成后有没有其他方法可以自动返回我的应用程序?)
    • Android 有一个 auto_return 参数,可以使用“l.com.squareup.pos.AUTO_RETURN_TIMEOUT_MS={your desired timeout in ms here}”将其添加到您的意图 url 字符串中(第一个字母是 L 长)。 timeout 参数最小为 3200L,最大为 10000L(必须在 3.2 到 10 秒之间)。不幸的是,文档网站中缺少此内容,但应尽快添加。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-08-03
    • 2018-10-09
    • 2017-12-11
    • 1970-01-01
    • 2018-09-18
    • 2018-02-06
    • 2017-11-10
    相关资源
    最近更新 更多