调用“/v1/payments/payment”时永久得到“INTERNAL_SERVICE_ERROR”


Permamently get "INTERNAL_SERVICE_ERROR" When calling "/v1/payments/payment"

目前我正在尝试通过Rest API实现PayPal。我已经阅读了文档,并编写了一个脚本,该脚本使用给定的示例JSJON对象(来自文档)执行对Rest API的所有调用。

不幸的是,我在调用 https://api.sandbox.paypal.com/v1/payments/payment 时收到以下答案对象(几天以来)

object(stdClass)[1181]
      public 'name' => string 'INTERNAL_SERVICE_ERROR' (length=22)
      public 'message' => string 'An internal service error has occurred' (length=38)
      public 'information_link' => string 'https://developer.paypal.com/webapps/developer/docs/api/#INTERNAL_SERVICE_ERROR' (length=79)
      public 'debug_id' => string 'c23de45eb8631' (length=13)

我发送的数据

{"intent":"sale","payer":{"payment_method":"paypal"},"transactions":[{"amount":{"currency":"EUR","total":"74.90"},"description":"This is the payment transaction description.","invoice_number":null,"item_list":{"items":[{"quantity":1,"name":"Hammerfall-DE","description":"Heavy Metal Klassiker der schwedischen Band Hammerfall mit sehr eing'u00e4ngigem, hymnischem Chorus, hohem M'u00e4nnergesang, melodischen Gitarren sowie nach vorne gehenden Double-Bass-Drums. Klingt sehr positiv. (Artist: Hammerfall) DE","pr'... (length=729)

我错过了什么吗?

可能是

因为您为对象description提供了item_list描述。根据文档提到的最大长度应为 127个字符 .您可以尝试将其减少到 127 个字符并重试:

您可以在此处参考文档:

https://developer.paypal.com/webapps/developer/docs/api/#item-object