nop 2.50, Cannot redirect after HTTP headers have been sent

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Hi

I get this error in the log on a new site based on 2.50 when confirm checkout and then redirected to homepage instead of payment site.

However another 2.50 site with same payment module on a different server also gives the error into the log but does complete the payment.

Both sites are installed with same deployment.

What can I do to solve the problem?
12 years ago
What payment method causes this issue? There could be two payment methods with PaymentMethodType property set to Redirection. The first one uses Response.Redirect() method (GET) and the second one uses RemotePost class (POST). Both of them caused with issue in nopCommerce 2.40. In nopCommerce 2.50 this issue was fixed for the first one type of payment methods (GET). The upcoming nopCommerce 2.60 has a fix for the second ones (POST). Please see changeset d9a9cbf510d8
12 years ago
a.m. wrote:
What payment method causes this issue? There could be two payment methods with PaymentMethodType property set to Redirection. The first one uses Response.Redirect() method (GET) and the second one uses RemotePost class (POST). Both of them caused with issue in nopCommerce 2.40. In nopCommerce 2.50 this issue was fixed for the first one type of payment methods (GET). The upcoming nopCommerce 2.60 has a fix for the second ones (POST). Please see changeset d9a9cbf510d8


Hi Andrei

It´s an ewire payment module and uses remotepost. I will try to implement the fix for 2.60.

Thank you
11 years ago
Hi Andrei,

i hope you read this post.
I have made a new version of the payment plugin of Omnikassa where i changed the PaymentMethodType to Redirect.
Doing this, it solved the problem that the Omnikassa plugin was not working on the one page checkout.
However in the log there is still the message: Cannot redirect after HTTP Headers have been sent.

I tried the plugin also with the latest build of Nop (the upcoming 2.60) where this changeset is also included:

d9a9cbf510d8

The plugin there is still working but the error message is also still there.

If you want you can see the source of the Omnikassa plugin on: http://omnikassa.codeplex.com
11 years ago
olandese wrote:
Hi Andrei,

i hope you read this post.
I have made a new version of the payment plugin of Omnikassa where i changed the PaymentMethodType to Redirect.
Doing this, it solved the problem that the Omnikassa plugin was not working on the one page checkout.
However in the log there is still the message: Cannot redirect after HTTP Headers have been sent.

I tried the plugin also with the latest build of Nop (the upcoming 2.60) where this changeset is also included:

d9a9cbf510d8

The plugin there is still working but the error message is also still there.

If you want you can see the source of the Omnikassa plugin on: http://omnikassa.codeplex.com


I solved the problem. I'm using now the RemotePost class to do the post. With the latest build of nop (the upcoming 2.60) the error message log disappeared.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.