Jump to content

PayPAl API "Not a valid cart" "Not a valid currency" email?


dt88

Recommended Posts

I had a customer call me yesterday struggling to process his payment, saying it would go through to the payment, he was very vague on details and i had other sales going through at the time, nor I couldnt reproduce any problems, so I put it down to him being an idiot and not clicking on the paypal link below.

but I got this email this morning from the internal prestashop shop email

Error reporting from your PayPalAPI module

A client has encountered a problem with the module PayPalAPI, see the report:

Not a valid cart
Not a valid currency


1. What is this?
2. How do i access these reports?
3. What caused this?
4. Does anyone know how to fix this?

Cheers,
DT88
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...
  • 1 month later...

Any new ideas on this problem? I am getting it as well, but at random times. Maybe once a week or so. How would one go about even troubleshooting this? Where would I start? My API works fine, and I have even made a test purchase of $1usd.

Link to comment
Share on other sites

but I got this email this morning from the internal prestashop shop email

    Error reporting from your PayPalAPI module

   A client has encountered a problem with the module PayPalAPI, see the report:

   Not a valid cart
   Not a valid currency 


1. What is this?
2. How do i access these reports?
3. What caused this?
4. Does anyone know how to fix this?



It seems that this error comes from Paypal Express Checkout.
(Note: it is not my Agile Express Checkout Module)
The error comes from following code in /modules/paypal/express/paypalexpress.php

       $cart = new Cart((int)($cookie->id_cart));
       if (!Validate::isLoadedObject($cart))
           $this->_logs[] = $this->l('Not a valid cart');
       $currency = new Currency((int)($cart->id_currency));
       if (!Validate::isLoadedObject($currency))
           $this->_logs[] = $this->l('Not a valid currency');


From the code, the error happens if the id_cart and id_currency in cookie is lost (or cleared)

Here is my guess:
when customer finish payment and comes back to your store immediately.
he/she will find the shopping cart is still there, not cleared. Because it will take a few seconds for Paypayl to validate the order, so it will take a few seconds for the carts to be cleared.
When customer see carts is still there, so he/she may try to checkout again. But at this moment, the cart is actually cleared. So the above errors. Not all customer will come back to see the cart and click the checkout again. that's why it happens randomly. This is just my guess.

For those want to know why it take a few seconds to validate the order and then prestaShop clear the cart, please visit here for more detail of the order processing of Paypal/PrestaShop

Link to comment
Share on other sites

but I got this email this morning from the internal prestashop shop email

    Error reporting from your PayPalAPI module

   A client has encountered a problem with the module PayPalAPI, see the report:

   Not a valid cart
   Not a valid currency 


1. What is this?
2. How do i access these reports?
3. What caused this?
4. Does anyone know how to fix this?



It seems that this error comes from Paypal Express Checkout.
(Note: it is not my Agile Express Checkout Module)
The error comes from following code in /modules/paypal/express/paypalexpress.php

       $cart = new Cart((int)($cookie->id_cart));
       if (!Validate::isLoadedObject($cart))
           $this->_logs[] = $this->l('Not a valid cart');
       $currency = new Currency((int)($cart->id_currency));
       if (!Validate::isLoadedObject($currency))
           $this->_logs[] = $this->l('Not a valid currency');


From the code, the error happens if the id_cart and id_currency in cookie is lost (or cleared)

Here is my guess:
when customer finish payment and comes back to your store immediately.
he/she will find the shopping cart is still there, not cleared. Because it will take a few seconds for Paypayl to validate the order, so it will take a few seconds for the carts to be cleared.
When customer see carts is still there, so he/she may try to checkout again. But at this moment, the cart is actually cleared. So the above errors. Not all customer will come back to see the cart and click the checkout again. that's why it happens randomly. This is just my guess.

For those want to know why it take a few seconds to validate the order and then prestaShop clear the cart, please visit here for more detail of the order processing of Paypal/PrestaShop



Well, I appreciate the guess. But I don't believe this is the case, as my shop contains no items and it would be impossible for anybody to add items to the cart lol. I have been trying to find the cause of this for a while now and I simply can't. Today I got two emails, about the paypal API not being a valid cart 1sec apart from each other. It would be impossible for a end user to trigger this error, so I can only believe that it is some sort of bug.
Link to comment
Share on other sites

  • 1 month later...

I am getting this as well, also my sites products are just being submitted to google and such and I have 650 carts created in thge last few days. Yet my traffic stats show no customers from google and each cart has no name or customer group assoicated with it. The all also have one one item selected, could this be search engine robots creating these carts?

They all came in within minutes of each other but I dont see any new orders I just see a list of 650 + carts..

Link to comment
Share on other sites

but I got this email this morning from the internal prestashop shop email

    Error reporting from your PayPalAPI module

   A client has encountered a problem with the module PayPalAPI, see the report:

   Not a valid cart
   Not a valid currency 


1. What is this?
2. How do i access these reports?
3. What caused this?
4. Does anyone know how to fix this?



It seems that this error comes from Paypal Express Checkout.
(Note: it is not my Agile Express Checkout Module)
The error comes from following code in /modules/paypal/express/paypalexpress.php

       $cart = new Cart((int)($cookie->id_cart));
       if (!Validate::isLoadedObject($cart))
           $this->_logs[] = $this->l('Not a valid cart');
       $currency = new Currency((int)($cart->id_currency));
       if (!Validate::isLoadedObject($currency))
           $this->_logs[] = $this->l('Not a valid currency');


From the code, the error happens if the id_cart and id_currency in cookie is lost (or cleared)

Here is my guess:
when customer finish payment and comes back to your store immediately.
he/she will find the shopping cart is still there, not cleared. Because it will take a few seconds for Paypayl to validate the order, so it will take a few seconds for the carts to be cleared.
When customer see carts is still there, so he/she may try to checkout again. But at this moment, the cart is actually cleared. So the above errors. Not all customer will come back to see the cart and click the checkout again. that's why it happens randomly. This is just my guess.

For those want to know why it take a few seconds to validate the order and then prestaShop clear the cart, please visit here for more detail of the order processing of Paypal/PrestaShop



This cant be the case after a week now of this issue and my site going live I have no orders but 3900 carts created. Something else must be wrong :(

BELOW IS AN IDEA OF HOW QUICKLY THEY ARE COMING IN, YET GOOGLE IS NOT SHOWING MUCH TRAFFIC? ARE THESE BOTS???????



3636 -- $3.00 -- 2011-05-22 16:57:30
3635 -- $3.00 -- 2011-05-22 16:49:35
3634 -- $3.00 -- 2011-05-22 16:41:41
3633 -- $2.70 -- 2011-05-22 13:09:08
3632 -- $2.70 -- 2011-05-22 12:42:51
3631 -- $2.70 -- 2011-05-22 09:26:42
3630 -- $3.00 -- 2011-05-22 05:32:33
3629 -- $3.00 -- 2011-05-22 05:09:28
3628 -- $3.00 -- 2011-05-22 04:49:06
3627 -- $3.00 -- 2011-05-22 04:30:28
3626 -- $3.00 -- 2011-05-22 04:18:20
3625 -- $3.00 -- 2011-05-22 03:56:07
3624 -- $3.00 -- 2011-05-22 03:53:05
3623 -- $3.00 -- 2011-05-22 03:51:36
3622 -- $3.00 -- 2011-05-22 03:50:06
3621 -- $3.00 -- 2011-05-22 03:47:07
3620 -- $3.00 -- 2011-05-22 03:45:31
3619 -- $3.00 -- 2011-05-22 03:44:02
3618 -- $3.00 -- 2011-05-22 03:42:29
3617 -- $3.00 -- 2011-05-22 03:40:59
3616 -- $3.00 -- 2011-05-22 03:39:27
3615 -- $3.00 -- 2011-05-22 03:37:57
3614 -- $3.00 -- 2011-05-22 03:36:30
3613 -- $3.00 -- 2011-05-22 03:33:26
3612 -- $3.00 -- 2011-05-22 03:31:53
3611 -- $3.00 -- 2011-05-22 03:30:23
3610 -- $3.00 -- 2011-05-22 03:28:51
3609 -- $3.00 -- 2011-05-22 03:27:21
3608 -- $3.00 -- 2011-05-22 03:15:06
3607 -- $3.00 -- 2011-05-22 03:13:43
3606 -- $3.00 -- 2011-05-22 03:09:25
3605 -- $3.00 -- 2011-05-22 03:00:52
3604 -- $3.00 -- 2011-05-22 02:55:11
3603 -- $3.00 -- 2011-05-22 02:52:19
3602 -- $3.00 -- 2011-05-22 02:50:53
3601 -- $3.00 -- 2011-05-22 02:49:29
3600 -- $3.00 -- 2011-05-22 02:48:02
3599 -- $3.00 -- 2011-05-22 02:46:38
3598 -- $3.00 -- 2011-05-22 02:42:21
3597 -- $3.00 -- 2011-05-22 02:40:54
3596 -- $3.00 -- 2011-05-22 02:27:30
3595 -- $3.00 -- 2011-05-22 02:19:54
3594 -- $3.00 -- 2011-05-22 02:17:23
Link to comment
Share on other sites

  • 1 month later...

*Bump* - Anyone got any ideas, Ive even disabled Express Checkout and im still getting these errors. Yet when i do a test payment everything is fine.
We seem to get 1 or 2 per day.. and no sales, Im just hoping these attempts where not potential customers :S

Link to comment
Share on other sites

My site has been live for about 6 months with 1-5 transaction per day but I still get this maybe once a week now. I'm just ignoring at the point, I don't think it's a possible customer trying to purchase something, paypal usually gives a you an definitely error is someone is trying to purchase and a error occurs.

Link to comment
Share on other sites

It's kind of annoying but I don't think it's something to go overboard about. If you have time to look into it I'd say go for it or even post it in the bug tracker and prestashop can look into it. I hope it's not something big because that'll mean I'm constantly losing customers but I wouldn't worry unless it's happening to you constantly.

Link to comment
Share on other sites

  • 1 month later...

Yes, exactly the same issue has started to occur at my site.

 

getting email with:

 

Error reporting from your PayPalAPI module

 

A client has encountered a problem with the module PayPalAPI, see the report:

 

Not a valid cart

Not a valid currency

 

Nothing has changed on my site, this just started happening a few days ago so would be interested to get a fix for it!

Link to comment
Share on other sites

  • 3 months later...

a client of mine is getting the exact same error. i disabled paypal express checkout and tested the standard paypal payments and they work fine. he is still getting this email several times a week. they do not seem to be real customers. How can we get rid of these errors? Any Idea?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...