Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Express Checkout - Invalid Token #318

Closed
angelleye opened this issue Sep 27, 2015 · 4 comments
Closed

Express Checkout - Invalid Token #318

angelleye opened this issue Sep 27, 2015 · 4 comments
Assignees
Milestone

Comments

@angelleye
Copy link
Collaborator

We've been getting reports lately from users saying they are getting Invalid Token errors.

In most cases there are no matching order details, and no complaints from users that their order failed. I think it could be search engine crawlers hitting the script that generates the DECP request, which of course has no data, so then they get an Invalid Token error.

I did have one user verify in his logs that it was an microsoft bing server that caused it.

This never seemed to be an issue before, but now this past month or so I've been seeing quite a few reports of this. We need to take a look to see if the DECP calls could be happening from search crawlers somehow, and then figure out a way to make that stop.

@angelleye angelleye added this to the 1.1.6.3.8 milestone Sep 27, 2015
levansy2020 added a commit that referenced this issue Sep 28, 2015
@levansy2020
Copy link
Contributor

I added some condition to make sure the TOKEN is exist and display a notice for user too.

@angelleye
Copy link
Collaborator Author

I see that you're using if (!isset(WC()->session->TOKEN)). I wonder if we should use if (empty(WC()->session->TOKEN)) instead..?? This way even if the session is set but has no value it would still trigger our error.

Thoughts?

@levansy2020
Copy link
Contributor

We have the unset(WC()->session->TOKEN) when the order completed so I think we do not need to check if it's empty or not.

@angelleye
Copy link
Collaborator Author

I think I'm going to change it anyway. using empty() will evaluate the same way !isset() would if the session simply is not set. If the session is set, though, but for some reason got wiped out, then empty() would catch that as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant