Simple Membership Plugin › Forums › Simple Membership Plugin › Stripe sandbox test fails
Tagged: error, payment test, stripe
- This topic has 9 replies, 4 voices, and was last updated 6 years, 1 month ago by
mbrsolution.
-
AuthorPosts
-
May 28, 2019 at 7:24 pm #18339
Ingrid
ParticipantI use the plugin for myself just fine with the Woocommerce integration. I am doing it now for a client with the Stripe payment processor, everything is ready to launch so we are now testing the payment and that it works and we have the same error every time:
Stripe Subscription Error! No such token: tok_1EfAKSKkXjP1NGyKEsTwI8Y9; a similar object exists in live mode, but a test mode key was used to make this request.Array ( [code] => resource_missing [doc_url] => https://stripe.com/docs/error-codes/resource-missing [message] => No such token: tok_1EfAKSKkXjP1NGyKEsTwI8Y9; a similar object exists in live mode, but a test mode key was used to make this request. [param] => source [type] => invalid_request_error )
And then I tried it “live” and I had the same error only this time:
Stripe Subscription Error! No such token: tok_1EfAKSKkXjP1NGyKEsTwI8Y9; a similar object exists in test mode, but a live mode key was used to make this request.Array ( [code] => resource_missing [doc_url] => https://stripe.com/docs/error-codes/resource-missing [message] => No such token: tok_1EfAKSKkXjP1NGyKEsTwI8Y9; a similar object exists in test mode, but a live mode key was used to make this request. [param] => source [type] => invalid_request_error )
So if I test with the sandbox mode on I get an error saying there is no such plan on test, if I dare try it (when I know it shouldn’t work) without the sandbox checkbox on I get an error that says there id no such plan on live, that a similar one exists on the other mode.
I followed the instructions for creating the Stripe button and doubled checked the test and live API keys and secret keys. I grabbed the PLAN ID, not product ID, and still every time I get an error. I need to be able to test it on sandbox mode and be sure it works, I can’t do a real payment.
Any ideas of what I’m missing or how to fix this???
May 28, 2019 at 7:54 pm #18340Ingrid
ParticipantThis is what I see on the log details:
[05/28/2019 6:29 PM] – SUCCESS: Stripe Subscription IPN received. Processing request…
[05/28/2019 6:29 PM] – SUCCESS: Sandbox payment mode is enabled. Using test API key details.
[05/28/2019 6:29 PM] – FAILURE: Error occurred during Stripe Subscribe. No such plan: plan_F6QUyXiljQJpxH; a similar object exists in live mode, but a test mode key was used to make this request.
[05/28/2019 6:29 PM] – FAILURE: Error details: Array
(
[code] => resource_missing
[doc_url] => https://stripe.com/docs/error-codes/resource-missing
[message] => No such plan: plan_F6QUyXiljQJpxH; a similar object exists in live mode, but a test mode key was used to make this request.
[param] => plan
[type] => invalid_request_error
)May 29, 2019 at 1:14 pm #18351The Assurer
ModeratorIf you were to do a “real” transaction, without the sandbox mode; does it work?
May 29, 2019 at 1:24 pm #18353Ingrid
ParticipantI don’t know, there is no way for me to check without paying the $150 or $550 that she’s charging on each subscription because I don’t have a way to add a discount code upon checkout to bring the price to zero (the popup just asks for personal info and card info).
May 29, 2019 at 1:40 pm #18354Ingrid
ParticipantAnd I do need to test both and see that I can open an account on both. She’s launching on the 31st, and everything is ready except for this Stripe thing. And there are no other plugins interfering (she has only the membership plugin, the mailchimp add on, and the redirection add on.) I even tried taking off the sandbox to force it to “switch” API keys and I tried twice: One it let me but it threw the same error but this time (like mentioned on the original post above) it said that there is nothing on live, but there is a similar on test. Then, of course, it detected that the card was a test card so the second time it did not let me finish. So I don’t know.
Everything looks “normal” on the Stripe end and even the webhook test works without throwing an error. The SM logs show that even the Mailchimp is working but it comes back to the problem after submitting the payment on the Stripe popup saying there is no such plan.
I have tried to test both of her plans and I am getting the same error.
May 29, 2019 at 6:50 pm #18358Ingrid
ParticipantI think the plugin is not using the right APIs for testing because I turned off the sandbox mode, turn it on again and now I keep getting a “you tried to use a known test card number on a live transaction” message. And my cache has been cleared, just in case, and same thing. Still unable to test the payment and signup process.
May 29, 2019 at 7:01 pm #18359Ingrid
ParticipantHere’s 15 seconds of exactly what I see every time: https://www.loom.com/share/0fbc96a04d1c4cfab9a38e7bc623d533
May 29, 2019 at 8:30 pm #18360Ingrid
ParticipantMade a $0 plan and tested it:
* TEST MODE / Sandbox: It always throws the SAME error as above.
* Live purchase: goes through just fine.So the problem is the sandbox/test mode?
April 2, 2020 at 11:17 am #20007paddy
ParticipantI don’t know if you ever fixed this or round a solution but I’m getting the exact same error. The plugin won’t correctly pick up a Stripe subscription in sandbox/text mode. Did you manage to solve this in the end? It looks like the bug hasn’t been fixed in nearly a year.
April 2, 2020 at 12:22 pm #20009mbrsolution
Moderator@paddy, sandbox mode is only for testing purposes. If live mode works, why worry about sandbox mode not working? What do you think?
Regards
-
AuthorPosts
- You must be logged in to reply to this topic.