PayPal REST API .net SDK - 400 Bad Requests

后端 未结 8 1444
庸人自扰
庸人自扰 2021-02-13 12:57

I\'m working in the sandbox and using the PayPal REST .net SDK method Payment.Create with a CreditCard object. When all parameters are valid and using the test CC number from h

8条回答
  •  梦如初夏
    2021-02-13 13:35

    This seems to have changed, and while many of these answers point in the right direction, none of them worked exactly for me. This is my equivalent of the currently most upvoted answer:

    catch (PayPal.PaymentsException ex)
    {
        context.Response.Write(ex.Response);
    }
    

    with the response:

    {"name":"VALIDATION_ERROR","details":[{"field":"start_date","issue":"Agreement start date is required, should be valid and greater than the current date. Should be consistent with ISO 8601 Format"}],"message":"Invalid request. See details.","information_link":"https://developer.paypal.com/docs/api/payments.billing-agreements#errors","debug_id":"8c56c13fccd49"}
    

提交回复
热议问题