1. Configure Braintree as Payment Gateway (Sandbox Mode, no 3D Secure)
2. Use Multipage Checkout
2. In Checkout we get an 500 Server Error
Description
It seems to be that there is a bug in the Multi Page Checkout with Braintree. When i select Braintree Credit Card Payment in the checkout, i get the following error : Incorrect Content-Type
I inspected the Code and saw that in the Component PaymentBrainTreeViewComponent there is a check if the current request is not GET and after, if the condition not hit, he try to read form data from the Request, but he cant because it is a GET Request and therefore we get a Server Error. In Multipage checkout we use POST for Request and the error doesnt happen.
//set postback values (we cannot access "Form" with "GET" requests)
if (Request.Method != WebRequestMethods.Http.Get)
return View("~/Plugins/Payments.BrainTree/Views/PaymentInfo.cshtml", model);
var form = await HttpContext.Request.ReadFormAsync();
model.CardholderName = form["CardholderName"];
model.CardNumber = form["CardNumber"];
Version: 4.6
Version of MongoDB: v4.2.2
Best regards,
Patrick