1

我正在尝试向 api 发送请求以更新 paypal Rest Api 的计费计划。

API 链接:https ://developer.paypal.com/docs/api/payments.billing-plans#plan_update

请求方法是:

HTTPoison.patch(Paypal.Config.url <> "/payments/billing-plans/#{plan.id}",
  [Poison.encode!(%{path: "/", value: %{"state" => "ACTIVE"}, op: "replace"})],
  Paypal.Authentication.headers, 
  timeout: :infinity, 
  recv_timeout: :infinity)
|> Paypal.Config.parse_response

但是响应给了我格式问题的错误。

%{"debug_id" => "a673179dcd91", 
  "information_link" => "https://developer.paypal.com/webapps/developer/docs/api/#MALFORMED_REQUEST", 
  "message" => "Incoming JSON request does not map to API request", 
  "name" => "MALFORMED_REQUEST"}

我的请求有什么问题?

4

0 回答 0