我一直在尝试为PayPal测试REST API以进行直接信用卡交易,而且我总是收到一条错误消息" UNKNOWN_ERROR"。
我已经包含了所有相关的Auth Headers等,并且在任何验证错误的情况下我得到了正确的响应,但只有当我尝试使用正面情况进行测试时才会出现此错误。我尝试过所有可能的信用卡号码(我的Sandbox测试帐号中的号码以及其他符合Mod 10标准的CC号码),但没有任何效果。这与我的PayPal帐户本身有关吗?它不应该因为至少对所有国家/地区的Sandbox都启用了直接CC付款。
这是为了将Salesforce集成到PayPal,但目前我甚至不关心这一点,我尝试从SOAPUI获得积极响应。
这是我的开发帐户信息中心的交易之一:
元数据:
{ " url":" / v1 / payment / payment", " create_time":" 2015-10-31T08:03:41Z", " additional_properties":{}, " account_number":" 1300707500520479771", " client_id":" AfWXek5HKSxF-IryNlxeCR8LLbCC_VYp8d3BlzJBaE-SNF3gfKPb-lEarpOu7EvBVFW-WzuWrsotojee", " id":" 563475df36b75d6a5faf5251" }
请求:
{ " body":{ "意图":"销售", "付款人":{ " payment_method":" credit_card", " funding_instruments":[ { " credit_card":{ " first_name":" Betsy", " last_name":"买方", " expire_month":11, " number":" xxxxxxxxxxxx3109", " cvv2":" ***", " expire_year":2020, "输入":"签证" } } ] }, "交易":[ { "金额":{ "货币":" USD", "总计":" 27.78" }, "说明":"这是付款交易说明。" } ] }, "标题":{ " x-pp-ads-performing":" false", "内容长度":" 653", " x-forwarded-server":" jensenhealey.ca1.paypal.com", "接受编码":" gzip,deflate", " x-forwarded-host":" api.sandbox.paypal.com", " user-agent":" Apache-HttpClient / 4.1.1(java 1.5)", " x-forwarded-for":" 10.72.108.11", " x-pp-silover":"名称%3DSANDBOX3.API.1%26silo_version%3D880%26app%3Dplatformapiserv%26TIME%3D3715445846", "连接":" Keep-Alive", "接受":" / ", " client-auth":"没有证书", "主持人":" api.sandbox.paypal.com", "授权":" xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxK48O", " x-pp-corrid":" f6b72bc35cbb5", " pp_remote_addr":" 182.66.112.160", "内容类型":" application / json", " x-pp-slingshot-targetapp":" platformapiserv" }, " additional_properties":{}, "方法":" POST" }
响应:
{ "状态":400, " duration_time":1054, " body":{ " message":"发生了未知错误", " information_link":" https://developer.paypal.com/webapps/developer/docs/api/#UNKNOWN_ERROR", " name":" UNKNOWN_ERROR", " debug_id":" f6b72bc35cbb5" }, " additional_properties":{}, "标题":{ "内容长度":" 185", "内容 - 语言":" *", " CORRELATION-ID":" f6b72bc35cbb5", "日期":"星期六,2015年10月31日08:03:41 GMT", "连接":"关闭", " Paypal-Debug-Id":" f6b72bc35cbb5", " PROXY_SERVER_INFO":" host \ u003dslcsbplatformapiserv3002.slc.paypal.com; threadId \ u003d380", " Content-Type":" application / json" } }