【问题标题】:How to use Order id in square-connect payment gateway in asp.net如何在asp.net的square-connect支付网关中使用订单ID
【发布时间】:2019-03-21 06:16:31
【问题描述】:

我使用此代码,当我删除 OrderId:“21071”这个时,这是工作完成的付款,但我想使用 OrderId:“21071”,这是“21071”我的网站订单 ID,客户从我的网站下订单。

ChargeRequest body = new ChargeRequest(AmountMoney: amount, IdempotencyKey: uuid, CardNonce: nonce, BillingAddress: address, ShippingAddress: address, BuyerEmailAddress: txtEmail.Text, ReferenceId: "Booking #:" + bookingid, Note: bookingid, OrderId: "21071");

    ChargeResponse response = transactionsApi.Charge(LocationId, body);

我遇到了这个错误

Error calling Charge: {"errors":[{"category":"INVALID_REQUEST_ERROR","code":"NOT_FOUND","detail":"Resource not found.","field":"order_id"}]}

当我使用没有 Orderid 的 Orderid 时出现错误,它工作正常,但我想使用 Orderid

【问题讨论】:

    标签: asp.net-mvc asp.net-web-api paypal payment-gateway square-connect


    【解决方案1】:

    您似乎在此处使用自己的订单 ID,而不是先使用订单 API 创建订单,然后在交易中引用该订单 ID。

    您可以在此处找到如何使用 Square Orders API 的示例:https://developer.squareup.com/docs/orders-api/cookbook/link-orders-and-catalog-item

    【讨论】:

      猜你喜欢
      • 2020-05-15
      • 2017-02-17
      • 1970-01-01
      • 2017-10-10
      • 1970-01-01
      • 2014-03-12
      • 1970-01-01
      • 1970-01-01
      • 2015-10-11
      相关资源
      最近更新 更多