Shopify Transactions API - 更新交易时显示错误的网关名称

Shopify Transactions API - wrong gateway name displaying when updating a transaction

我正在发送 POST 以捕获多个支付网关:

一张礼品卡(自定义支付网关)和一张信用卡(条纹)。 我的 Stripe 捕获没有问题。无论我尝试捕获交易的顺序如何,礼品卡在捕获时始终将支付网关标记为 Stripe。

这是我的交易POST

$this->client->post("admin/orders/{$shopifyTransaction->getOrderId()}/transactions.json", [], $serializedModel);

成功将状态更新为在 shopify 上捕获。

我的交易是这样的:

'transaction' => 
  array (
    'id' => 123456789,
    'order_id' => 123456789,
    'amount' => 4.23,
    'kind' => 'capture',
    'gateway' => 'Gift Card',
  ),
)  

我的回复是这样的:

'transaction' => 
  array (
    'id' => 567890989,
    'order_id' => 567890989,
    'amount' => '4.23',
    'kind' => 'capture',
    'gateway' => 'Stripe',
    'status' => 'success',
    'message' => 'Marked the Stripe payment as received',
    'created_at' => '2017-01-11T21:59:22-05:00',
    'test' => false,
    'authorization' => NULL,
    'currency' => 'CAD',
    'location_id' => NULL,
    'user_id' => NULL,
    'parent_id' => 3124665367,
    'device_id' => NULL,
    'receipt' => 
    array (
    ),
    'error_code' => NULL,
    'source_name' => '1313490',
  )

我错过了什么吗?

事实证明,如果您使用自定义网关,您应该将其作为第一笔交易发送。我只是 array_reverse 交易数组,它解决了这个问题。不知道为什么,但确实如此。