{"action":"created","issue":{"url":"https://api.github.com/repos/rebelidealist/stripe-ruby-mock/issues/284","repository_url":"https://api.github.com/repos/rebelidealist/stripe-ruby-mock","labels_url":"https://api.github.com/repos/rebelidealist/stripe-ruby-mock/issues/284/labels{/name}","comments_url":"https://api.github.com/repos/rebelidealist/stripe-ruby-mock/issues/284/comments","events_url":"https://api.github.com/repos/rebelidealist/stripe-ruby-mock/issues/284/events","html_url":"https://github.com/rebelidealist/stripe-ruby-mock/issues/284","id":120483782,"number":284,"title":"You must supply a valid card error","user":{"login":"sublimecoder","id":3429823,"avatar_url":"https://avatars.githubusercontent.com/u/3429823?v=3","gravatar_id":"","url":"https://api.github.com/users/sublimecoder","html_url":"https://github.com/sublimecoder","followers_url":"https://api.github.com/users/sublimecoder/followers","following_url":"https://api.github.com/users/sublimecoder/following{/other_user}","gists_url":"https://api.github.com/users/sublimecoder/gists{/gist_id}","starred_url":"https://api.github.com/users/sublimecoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sublimecoder/subscriptions","organizations_url":"https://api.github.com/users/sublimecoder/orgs","repos_url":"https://api.github.com/users/sublimecoder/repos","events_url":"https://api.github.com/users/sublimecoder/events{/privacy}","received_events_url":"https://api.github.com/users/sublimecoder/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-04T20:51:13Z","updated_at":"2016-02-20T08:57:41Z","closed_at":null,"body":"while running and rspec/capybara integration tests I am getting this error.\r\n\r\n``` ruby\r\nStripe::InvalidRequestError: You must supply a valid card xoxo\r\nfrom /Users/jsmith/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/stripe-ruby-mock-2.2.1/lib/stripe_mock/client.rb:20:in `block (2│)\r\n levels) in mock_request'\r\n```\r\nit seems to think the token I'm using for the card is in correct. I have tried using the stripe javascript generated token and a hard coded \"test_tok_1\" in a javascript stub of the stripe.js.\r\n\r\nAny help on getting the mock server to accept a token during an integration test would be greatly appreciated. "},"comment":{"url":"https://api.github.com/repos/rebelidealist/stripe-ruby-mock/issues/comments/186545167","html_url":"https://github.com/rebelidealist/stripe-ruby-mock/issues/284#issuecomment-186545167","issue_url":"https://api.github.com/repos/rebelidealist/stripe-ruby-mock/issues/284","id":186545167,"user":{"login":"YaroSpace","id":5670940,"avatar_url":"https://avatars.githubusercontent.com/u/5670940?v=3","gravatar_id":"","url":"https://api.github.com/users/YaroSpace","html_url":"https://github.com/YaroSpace","followers_url":"https://api.github.com/users/YaroSpace/followers","following_url":"https://api.github.com/users/YaroSpace/following{/other_user}","gists_url":"https://api.github.com/users/YaroSpace/gists{/gist_id}","starred_url":"https://api.github.com/users/YaroSpace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YaroSpace/subscriptions","organizations_url":"https://api.github.com/users/YaroSpace/orgs","repos_url":"https://api.github.com/users/YaroSpace/repos","events_url":"https://api.github.com/users/YaroSpace/events{/privacy}","received_events_url":"https://api.github.com/users/YaroSpace/received_events","type":"User","site_admin":false},"created_at":"2016-02-20T08:57:41Z","updated_at":"2016-02-20T08:57:41Z","body":"This will also do it:\r\n```\r\n  allow_any_instance_of(StripeMock::Instance).to receive(:get_card_by_token) {\r\n    StripeMock::Data.mock_card Stripe::Util.symbolize_names({})\r\n  }\r\n```"}}