Shopware 6:管理 API:获取 Paypal TransactionID

问题描述 投票:0回答:0

有什么方法可以在 Shopware 6 中获取有效的付款交易 ID 吗?

这里我将 Admin API 与本地测试系统一起使用。在我的示例中,我需要获取正确的 PayPal ReferenceID/TransactionID,以便能够将资金分配给我的 ERP 系统中的订单。

所以我向我的本地主机询问../api/order-transaction/873fc23614014332bdceef9fb2b24fa8并得到很多东西,但唯一有趣的部分似乎是:

 },
        "stateId": "2b906296104e4a0f80f3d3ea4391b9f1",
        "id": "873fc23614014332bdceef9fb2b24fa8",
        "customFields": {
            "swag_paypal_order_id": "*****************",
            "swag_paypal_partner_attribution_id": "Shopware_Cart_EC_6native"
}

正确的ID是customField“swag_paypal_order_id”,因为我在网站上使用swag。我需要独立于附加组件才能将付款与订单关联起来。当我使用“mollie”或 PayPal 的其他附加组件时,它也可能是其他 custom_field (此付款 transactionid 导入应该在具有不同附加组件的不同商店中使用)。所以这不能解决我的问题。另外,如此重要的字段的“customField”并不是我真正想要的。

我还尝试直接访问订单表,因为也应该有交易信息,但我没有找到使用 admin_api 的方法。

paypal shopware shopware6 shopware6-api
© www.soinside.com 2019 - 2024. All rights reserved.