目前我正在尝试通过Rest API实施PayPal。我已经阅读了文档,并编写了一个脚本,该脚本使用givin示例JSJON Objects(来自文档)执行对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)
我错过了什么吗?
答案 0 :(得分:2)
可能是因为您为item_list对象description
提供的描述。根据文档提到的最大长度应为127个字符。您可以尝试将其减少到127个字符并再次尝试:
您可以在此处参考文档:
https://developer.paypal.com/webapps/developer/docs/api/#item-object