我想知道如何从Square上的交易中获取此项目描述/信息。对我来说,即使使用:
'/v2/locations/{0}/transactions/{1}'.format(LOC_ID, tid)
不返回任何项目名称,而是完全匿名/无用的信息:
{
"transaction": {
"id": "BZDxxxxxx",
"location_id": "3PBxxxxx",
"created_at": "2016-10-14T22:55:33Z",
"tenders": [
{
"id": "VJO1rxxxxx",
"location_id": "3PBxxxx",
"transaction_id": "BZDxxxxxx",
"created_at": "2016-10-14T22:55:31Z",
"amount_money": {
"amount": 2800,
"currency": "USD"
},
"processing_fee_money": {
"amount": 0,
"currency": "USD"
},
"type": "OTHER"
}
],
"product": "REGISTER",
"client_id": "1E7xxxx"
}
}
如何从上面返回的内容转到网站交易列表中显示的项目名称?
答案 0 :(得分:1)
您可以使用Orders Endpoints逐项列出您的交易您是否尝试使用/v1/{location_id}/payments
端点?您可以获得有关该项目的更多信息。
https://docs.connect.squareup.com/api/connect/v1/#updatingorderstate