Braintree Multi Page Checkout

Friday, December 27, 2024 2:13:51 AM
  • Posted: Wednesday, April 1, 2020 1:41 PM
  • 3
Sample Report
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
0
  • Posted: Wednesday, April 1, 2020 1:45 PM
  • 3
Patrick wrote:
In Multipage checkout we use POST for Request and the error doesnt happen.
k

Sry, I wanted to write In OnePage checkout we use POST for Request and the error doesnt happen.
k
0
  • Posted: Thursday, April 2, 2020 5:53 AM
  • 953
Hello,

Thanks for notification, we will investigate it. Here is the work item.
Best regards,
Patryk

GrandNode Team
0
  • Posted: Friday, April 3, 2020 12:51 PM
  • 953
Hi,

We've fixed issue :)
Best regards,
Patryk

GrandNode Team
0
back to top
Filters