【问题标题】:Is there a way to add an order ID to the Square Reader SDK Checkout Flow?有没有办法向 Square Reader SDK Checkout Flow 添加订单 ID?
【发布时间】:2020-04-22 20:35:54
【问题描述】:

我来自 React Web 背景,我熟悉在线支付 API。目前,我正在使用方形阅读器 SDK 的 react native 快速入门。 SDK 使用:

await startCheckoutAsync(checkoutParams)

这是一个无需连接到后端即可通过移动应用程序处理付款的功能(这是我在 Web 应用程序开发中所习惯的)。结帐参数如下所示:

    // A checkout parameter is required for this checkout method
    const checkoutParams = {
      amountMoney: {
        amount: 100,
        currencyCode: 'USD', // optional, use authorized location's currency code by default
      },
      // Optional for all following configuration
      skipReceipt: false,
      collectSignature: true,
      allowSplitTender: false,
      delayCapture: false,
      note: 'Hello ???? ???? World!',
      tipSettings: {
        showCustomTipField: true,
        showSeparateTipScreen: false,
        tipPercentages: [15, 20, 30],
      },
      additionalPaymentTypes: ['cash', 'manual_card_entry', 'other'],
    };

但是我的问题是无法将订单与此结帐流程相关联。 根据 Square Reader 文档: https://github.com/square/react-native-square-reader-sdk/blob/master/docs/reference.md#checkoutparameter

checkout 参数不接受订单 ID,或者以某种方式映射正在出售的商品,这与在线创建支付 API 不同: https://developer.squareup.com/reference/square/payments-api/create-payment

在 API 调用中指定一个订单 ID。

如何正确处理将订单 ID 关联到 react-native 读卡器 sdk 结帐流程

【问题讨论】:

    标签: react-native square-connect square


    【解决方案1】:

    目前,没有适当的方法将订单链接到 ReaderSDK 付款。 ReaderSDK 目前不允许分项,per the docs

    【讨论】:

    • 你推荐替代品吗?
    • @HarounAnsari 你有没有想过解决这个问题?现在(2 年后)通过类似的需求工作,情况仍然如此。阅读器 SDK 使用的交易现在也已弃用,即使没有使用新付款的选项。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多