#_lionelp

1 messages · Page 1 of 1 (latest)

tranquil finchBOT
oblique wedge
#

Hi! Let me help you with this.

#

You shouldn't send card numbers to Stripe directly.

potent cipher
#

Sure but there are safe ways to test isn't it?

oblique wedge
potent cipher
#

I use 4242424242424242 because the doc says to use this so...

potent cipher
oblique wedge
#

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.

potent cipher
#

like this ?

$paymentMethod = \Stripe\PaymentMethod::create([
  'type' => 'card',
  'card' => [
    'token' => 'tok_visa',
  ],
]);
oblique wedge
#

Yes

potent cipher
#

Ok, thanks! next bug 👀