简体   繁体   English

为什么我从 Square 收到“只读字段已计算且无法由客户端设置。(order.returns)”? (我不发送那个字段)

[英]Why am i receiving "Read-only field is calculated and cannot be set by a client. (order.returns)" from Square? (I'm not sending that field)

I'm using Square for processing payments, and trying to make a refund I'm getting the following response:我正在使用 Square 处理付款,并尝试退款,但收到以下回复:

{"errors": [{"code": "INVALID_VALUE","detail": "Read-only field is calculated and cannot be set by a client.","field": "order.returns","category": "INVALID_REQUEST_ERROR"}]}

It seems that the field "order.returns" is being sent but it isn't, this is my request body:似乎正在发送字段“order.returns”,但事实并非如此,这是我的请求正文:

{"amount_money":{"currency":"USD","amount":3000},"reason":"requested_by_customer","payment_id":"BwC...","idempotency_key":"083bba8fabb9df88cf50fa1c489db275"}

It's a POST request to this endpoint: https://connect.squareup.com/v2/refunds这是对这个端点的 POST 请求: https : //connect.squareup.com/v2/refunds

Any idea of why I'm getting this error?知道为什么我会收到此错误吗? It seems to be a kind of bug in Square, but I couldn't find any information about it on the internet.这似乎是 Square 的一种错误,但我在互联网上找不到任何有关它的信息。 Any help is appreciated.任何帮助表示赞赏。

{"errors": [{"code": "INSUFFICIENT_SCOPES","detail": "商家没有授予您的应用足够的权限来执行此操作。商家必须为以下范围授权您的应用:[PAYMENTS_READ]"," category": "AUTHENTICATION_ERROR"}]}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我正在尝试仅为零售商组启用货到付款 - I am trying to enable cash on delivery only for Retailer group 创建field55,设置token或pan - create field55, set token or pan 我可以将Square Reader输出用于自己的用途吗? - Can I use Square Reader output for my own usages? 我是否需要使用Square OAuth向我的应用中通过Square完成的用户交易添加费用? - Do I need to use square oAuth to add a fee to users transactions done via square in my app? 我可以使用Paypal API从一个用户直接向另一个用户汇款吗? - Can I use Paypal APIs for sending money from one user to another directly? 我可以将此功能添加到Square Register:向表分配一些客户吗? - Can I add this feature to Square Register: Assign some customers to tables? 收到PayPal付款后如何执行代码? - How can I execute code after receiving a paypal payment? 我遇到了 TAP 付款问题 - I am getting issue with TAP Payment 当我都不是时,是否可以处理付款给收款人的事情? - Is it possible process a payment that goes giver to receiver, when I am neither? 我怎么知道支付宝的付款顺序? - How can I know which order for the paypal payment?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM