douzi2333
2015-01-19 10:10
浏览 43
已采纳

在拨打“/ v1 / payments / payment”时永久获得“INTERNAL_SERVICE_ERROR”

Currently I'm trying to implement PayPal via Rest API. I've read the documentation and I wrote a script which executes all calls to the Rest API with the givin example JSJON Objects (from the documentation).

Unfortunately I get following answer object (since several days) when calling 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)

The data I sent

{"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)

Did I miss anything?

图片转代码服务由CSDN问答提供 功能建议

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

不幸的是我得到了以下答案对象(因为 几天)致电 https://api.sandbox.paypal.com/v1/payments/ 付款

  object(stdClass)[1181] 
 public'name'=> 字符串'INTERNAL_SERVICE_ERROR'(长度= 22)
公共'message'=> 字符串'发生内部服务错误'(长度= 38)
 public'info_link'=> 字符串'https://developer.paypal.com/webapps/developer/docs/api/#INTERNAL_SERVICE_ERROR'(长度= 79)
 public'debug_id'=>  string'c23de45eb8631'(length = 13)
   
 
 

我发送的数据

  {“intent”:“ 出售 “ ”支付者“:{ ”PAYMENT_METHOD“: ”贝宝“}, ”交易“:[{ ”量“:{ ”货币“: ”EUR“, ”总“: ”74.90“}, ”说明“:” 这是付款交易说明。“,”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。(艺术家:Hammerfall)DE“,”pr'...(长度 = 729)
   
 
 

我错过了什么吗?

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dpdbu24262 2015-01-19 14:33
    已采纳

    Might be it is because of the description that you have given for item_list object description .The maximum length mentioned according to the docs should be 127 characters . Can you try to reduce it to 127 chars and try once again :

    You can refer the docs here :

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

    已采纳该答案
    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题