Authorize.NET payment module - 4.0 Error

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
I'm having the same "Incorrect Content-Type" error. The problem appears to stem from the browser POST-ing to /checkout/paymentmethod but then being GET-redirected to /checkout/paymentinfo. Manually changing the action of the form to /checkout/paymentinfo solves the error and allows the payment to proceed.
6 years ago
I am also getting same error.

InvalidOperationException: Incorrect Content-Type:
Nop.Web.Framework.Infrastructure.Extensions.ApplicationBuilderExtensions+<>c.<UseNopExceptionHandler>b__1_1(HttpContext context) in ApplicationBuilderExtensions.cs
-
                            EngineContext.Current.Resolve<ILogger>().Error(exception.Message, exception, currentCustomer);
                        }
                    }
                    finally
                    {
                        //rethrow the exception to show the error page
                        throw exception;
                    }
                });
            });
        }
        /// <summary>
Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware+<Invoke>d__6.MoveNext()
Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware+<Invoke>d__6.MoveNext()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware+<Invoke>d__7.MoveNext()
6 years ago
Only way process the order with Authorize.net is use One Page Checkout.
Regular checkout getting error.
Short message  
Incorrect Content-Type:
Full message  
System.InvalidOperationException: Incorrect Content-Type:
   at Microsoft.AspNetCore.Http.Features.FormFeature.ReadForm()
   at Microsoft.AspNetCore.Http.Internal.DefaultHttpRequest.get_Form()
   at Nop.Plugin.Payments.AuthorizeNet.Components.AuthorizeNetViewComponent.Invoke()
   at lambda_method(Closure , Object , Object[] )
   at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
   at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.InvokeSyncCore(ObjectMethodExecutor executor, ViewComponentContext context)
.....
6 years ago
Bump, any resolution to this? I am still facing the same issue and OPC isn't an option.
6 years ago
This is an issue with the View Component Request set to Form instead of Query. You would need to recompile the

Nop.Plugin.Payments.AuthorizeNet plugin.

- go to: Nop.Plugin.Payments.AuthorizeNet code
- change Components/PaymentManualViewComponent.cs : 40

from

            var form = Request.Form;
to
            var form = Request.Query;

- recompile the plugin
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.