#hendie-rawpan-block
1 messages · Page 1 of 1 (latest)
Gotcha
So you can enable this functionality in your account settings here: https://dashboard.stripe.com/settings/integration
But that might not be sufficient especially if this is for an automated test suite
You likely wouldn't want this to remain enabled I'm assuming
well, we have continuous integration so our specs run all the time
Gotcha
Thinking of options
I suppose you could create a separate stripe account for testing and enable this functionality
That way passing card details isn't enabled for your live account
honestly, I feel this is something that should be possible in test mode without having to introduce a different Stripe account with the accompanying configuration changes that detects for test mode, etc, etc
I am quite happy that you be strict in production mode, but we need the above functionality (and have had it for years) for tests
Yeah I can take a feature request to enable this for only test mode. Your usecase is for sure valid. I think they rolled out this change just because in general they try to make test mode match live as much as possible
this is seriously affecting our deploy process, all our test cases are now blocked
Let me actually ask a colleague if there's another way around this for test mode atm
Understood. Let me get back to you
thank you
that would be great, since a feature request is not going to solve this for our deploy tomorrow. Our requirements for deploy is a green spec run, so this is a serious blocker for us.
what about a lower API version test key. I have seen other discussions here where folks have mentioned that older API keys do not exhibit this behaviour
We are experiencing this on a brand new Stripe account we need to start using, so the API keys are on API ver 2022-11-15
and we'll only need at test API key on an older version, the production keys can be the latest, at least until there is some way of getting a more specific test token than the ones you make available today.
@dense crown I'm taking over as I have more context
If you use stripe-mock and never hit our API you wouldn't hit this issue at all. If you do hit our real API (in Live or Test mode) on a brand new Stripe account then you will hit that issue
I'm fairly certain that you're hitting this issue because you are not mocking that API request and hit our real API
that I have seen, yes
hendie-rawpan-block
We're working on blocking raw PANs access by default on most accounts. We're doing this carefully and have started with brand new accounts which can't do this anymore at all without official approval (before you just had to flip a Dashboard setting)
I appreciate that
alternatively, is there a way to get a test token with a specified expiry date?
What are you really trying to test? The expiration date shouldn't really matter in most cases
our app is directing requests to two different platform accounts, and we need to test that too - so a full StripeMock will not work - for those tests we need to hit the real Stripe test servers
We have a process that sends out an email to a user when their card is within two months of expiry
My advice is to never hit our real API for any tests 🙂
Especially for cases like this with emails, I would just mock the response entirely and simulate that
so do you a mock libraries for Ruby that handle bank accounts, ach, terminals, etc?
stripe-mock does that. You get a Token back and then you change the values you care about and mock that. Or just bypass this entirely since the cron job you're running is likely pulling from internal data in your own database and unrelated to our API
Ultimately, while we can give PAN access in Test mode, it's usually limited to accounts that need PAN access in Live mode instead
yeah, that's not us