Paypal - 从交易标识符中获取订单标识符

Paypal - Get the order identifier out of transaction identifier

我无法在文档中找到有关如何从每日交易详细信息报告中收到的捕获 ID 中获取订单 ID 的信息。我找到的唯一方法是在捕获收到请求后检查捕获中的链接字段,但是,这似乎不是最好的方法。

Does anyone know how to achieve it directly?

如果您使用的是 Orders V2 API,订单 ID 仅在结帐批准期间使用。它在交易创建后不会保留,并且使用 transaction/capture id: https://developer.paypal.com/docs/api/payments/v2/#captures_get 查找捕获的付款详细信息,不会 return 结帐期间使用的订单 ID,因为它对任何事情都没有用那时。