#_lionelp
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
You shouldn't send card numbers to Stripe directly.
Sure but there are safe ways to test isn't it?
If you want to use a a token in your tests, you can use of the test tokens: https://stripe.com/docs/testing?testing-method=tokens#cards
I use 4242424242424242 because the doc says to use this so...
What doc?
I was looking at https://stripe.com/docs/testing#cards
Yes, but that's for manually testing Stripe Elements or Stripe Checkout. Your app shouldn't send API requests with card numbers directly to Stripe, as this is unsafe and not PCI-compliant.
You can use existing test tokens like tok_visa instead.
like this ?
$paymentMethod = \Stripe\PaymentMethod::create([
'type' => 'card',
'card' => [
'token' => 'tok_visa',
],
]);
Yes
Ok, thanks! next bug 👀