2017-01-12 99 views
0

我发送POST捕获多个支付网关时显示:Shopify交易API - 错误的网关名称更新交易

礼品卡(定制支付网关)和信用卡(条)。 我的条纹捕捉没有问题。无论我尝试捕获交易的顺序如何,礼品卡始终将付款网关标记为捕获上的条带。

这是我的交易后

$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', 
) 

我缺少的东西?

回答

0

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