paypal / PayPal-NET-SDK

.NET SDK for PayPal's RESTful APIs
https://developer.paypal.com
Other
536 stars 462 forks source link

The remote server returned 400. Don't work with payee. #416

Closed Islamidin closed 4 years ago

Islamidin commented 5 years ago

General information

Issue description

Payment payment = new Payment { intent = "sale", payer = new Payer { payment_method = "paypal" }, transactions = new List { new Transaction { description = "Transaction description.", invoice_number = userSettingsDto.Id.ToString(), amount = new Amount { currency = "GBP", total = model.Service.Deposit?.ToString("0.00") }, item_list = new ItemList { items = new List { new Item { name = "Deposit", currency = "GBP", price = model.Service.Deposit?.ToString("0.00"), quantity = "1", sku = "sku" } } } } }, redirect_urls = new RedirectUrls { cancel_url = cancelUrl, return_url = returnUrl }, payee = new Payee { email = "razory@mail.ru" } }; I am trying to create payment and it works when I am not adding payee. But when I adding payee I am getting this error:

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

prakash-gangadharan commented 4 years ago

Hi @Islamidin, The PayPal-Debug-ID given by you in the description was expired, can you please help us with the recent one.

prakash-gangadharan commented 4 years ago

Revert us back if this is still an issue.