Paypal problem (not pro), order failed

[quote name=‘BluEyeGuy’]I am still having issues. Anyone have a fix for this yet? Is it a Paypal issue or CS-Cart needing to fix something Paypal changed on their end?[/QUOTE]All my paypal orders started working again once Paypal fixed the problem on May 19th.


I was told by cs-cart that this issue was due to my site be in a closed status. I am now live and the same problem occurs, if this issue was a PayPal issue would it not be resolved across the board?



See my previous post.

Solved the issue.

I still haven’t solved this issue. I implemented the temporary fix ThomH suggested and that allows the orders to be placed without the failed notices. However, I still receive the “This invoice has already been paid. For more information, please contact the merchant” error message when I try to place a test order through the Paypal Sandbox.

When I go back to my original CS-Cart code without ThomH’s fix and try to place an order through the Paypal sandbox account I get immediate order failure notices.

I also tried to add in the suggested code fix from Bug Fix #765, but that didn’t solve the issue.

For now I’ll have to live with the temporary fix until I can figure out what’s going wrong? Do I need to update anything in my Paypal profile? Everything was working perfectly before and I didn’t change anything on my end, so not sure what could be causing this. Anyone have any ideas? Currently running upgraded cart version 1.3.5 SP3.

For “This invoice has already been paid. For more information, please contact the merchant” - delete the cookies or try in firefox.

we got sometimes this error when tested with sandbox.

on live store never.

The Bug Fix #765 not solved properly this issue.

The 7 s delay is not enough, over 60 s got php error.

Use our temporary fix until PayPal fix this mistake.

I tried deleting the cookies and I only use Firefox, but still am having issues.

Several weeks back when I started suddenly receiving failed order notices, but successfully receiving Paypal payments, I came here looking for a fix. I saw the one you posted and have been using that since. Since that time I have only tried testing on Paypal’s sandbox and not a live store, but isn’t that the point of the sandbox, so you can test what will really happen on a live store?

So we know for sure Paypal needs to fix this and not CS-Cart, right? I’ll keep using the temporary fix until we find a permanent one.

Thanks for your help.

I was having this issue with SP2 and now with SP3. I am also using which offers paypal as a payment option for users. So for now I am just disabling the Paypal option directly from my site and will let them do it from 2checkout.

Hopefully this will be fixed.

Any progress on this? I’m running into the same issue. :frowning:

We are now experiencing similar problems with Failed orders. When we go to Paypal to check the status it has been paid. It’s an added problem for us because when the system puts the order as Failed it restocks the items and someone else ends up buying what was already purchased. Quantity is very important for our type of business.

Does anyone know what causes a payment to receive the Failed status?

I also saw the mods in this thread and am hesitant to change anything without knowing that it fixes it.


[quote name=‘BluEyeGuy’]Anyone know if this just affects SP3?

Paypal is my ONLY payment processor and thus I’ve had to take down my store entirely to avoid any further issues until this is resolved. Needless to say I’m not a happy camper right now.[/quote]

Just tested again now after upgrade. I’m having same problem in SP3.

The helpdesk found a solution (that also worked for me) to the problem of successful payments but failing orders for 1.3.5 SP3. After all the times I went over that file trying to learn its ups and downs, I think it should work for all of you too.

[quote name=‘the Helpdesk’]

There was a bug in the CS-Cart 1.3.5-sp3 version. In order to fix it you should replace the following part of code in the “paypal.php” file located in the “payments/cc_processors” directory to resolve the problem:

```php include PAYMENT_FILES_DIR . ‘payment_cc_complete.php’;

} elseif ($mode == ‘return’) {

$order_info = fn_get_order_info($order_id);

if ($order_info[‘status’] == ‘O’) {

$pp_response[‘order_status’] = ‘F’;

$pp_response[“reason_text”] = fn_get_lang_var(‘text_transaction_declined’);

include PAYMENT_FILES_DIR . ‘payment_cc_complete.php’;


if (!defined(‘ORDER_NOTIFICATION_SENT’)) {



```with this one:


include PAYMENT_FILES_DIR . ‘payment_cc_complete.php’;

} elseif ($mode == ‘return’) {

fn_define(‘ORDER_NOTIFICATION_SENT’, true);

fn_order_placement_routines($order_id, @$notify_user);

} elseif ($mode == ‘cancel’) {

$order_info = fn_get_order_info($order_id);

$pp_response[‘order_status’] = ‘F’;

$pp_response[“reason_text”] = fn_get_lang_var(‘text_transaction_declined’);

include PAYMENT_FILES_DIR . ‘payment_cc_complete.php’;

``` And replace the following part of code there:


```with this one:

```php ```Save the file.


Yes, solved the problem.

Here’s the difference.

[quote name=‘ThomH’]And replace the following part of code there:

[COLOR=DarkRed]PHP Code:


with this one:

PHP Code:


I didn’t see any difference.[/quote]

Seems to be working for me. Thanks for the fix.

Been on SP3 for a while now, had problem with Paypal orders failing so disabled Paypal, forcing customers to use other payment option. Around mid May switched Paypal back on after further testing and all has been fine - until today … another failed order yet payment received.

I haven’t made any changes so I guess this must be a Paypal thing and not CS.


Barry: I assume you tried the fix posted by mdekok3000 above?

I have been having problems with paypal recently.

Right now it never makes it to the paypal page. groan.

Before there was another problem that I asked cs to look at but they said they could not recreate it. Which was why I was trying it just now.

Here is a fix for Version 1.3.5 sp2 supplied by the Helpdesk.

I recommend you contact support to fix the problem if you are not confident in altering your files. Always make a backup and test!

In the “paypal.php” file located in the “payments/cc_processors” directory of your CS-Cart replace this code;

} elseif ($mode == 'return') {
fn_order_placement_routines($order_id, @$notify_user);

with this code;

} elseif ($mode == 'return') {
fn_define('ORDER_NOTIFICATION_SENT', true);
fn_order_placement_routines($order_id, @$notify_user);

} elseif ($mode == 'cancel') {
$order_info = fn_get_order_info($order_id);
$pp_response['order_status'] = 'F';
$pp_response["reason_text"] = fn_get_lang_var('text_transaction_declined');

include PAYMENT_FILES_DIR . 'payment_cc_complete.php';
fn_order_placement_routines($order_id, @$notify_user);

BlueEyeGuy: No, we did not implement the fix. When we first noticed the problem we contacted Help Desk and they couldn’t recreate, they did testing and couldn’t find anything. Contacted Paypal and they said everything there was fine. So after having Paypal disabled for a couple of weeks we switched it back on and saw no further problems - until the other day.

Not going to make any changes for now, as I said previoiusly am not convinced it’s a CS problem.


I do recommend the change. They did say to me that it was indeed a bug in the CS-Cart software.