cartalyst / stripe-laravel

Cartalyst Stripe package integration for Laravel.
BSD 3-Clause "New" or "Revised" License
335 stars 57 forks source link

Minimum version for SCA compliant #69

Closed atomos1 closed 3 years ago

atomos1 commented 3 years ago

From which version cartalyst/stripe-laravel support SCA? Thanks

brunogaspar commented 3 years ago

For cartalyst/stripe-laravel is since v3.0.0, for cartalyst/stripe is since v2.2.0.

Hope it answers your question.

atomos1 commented 3 years ago

Thank you Bruno, but with "cartalyst/stripe-laravel": "7.0.*" I get this error of authentication_required

What is causing this error if the library supports SCA?

Tested with a test card that triggers 3D Secure.

brunogaspar commented 3 years ago

Without seeing any code, is quite difficult to understand what might be wrong.

I recommend to read the official Stripe API Reference here and see what parameters you can send through the payload, as you might be sending old parameters for the version your API Key is using.

atomos1 commented 3 years ago

My code is actually this

$charge = Stripe::charges()->create([
    'customer' => $stripe_customer_id,
    'currency' => 'EUR',
    'capture' => false,
    'amount' => $price->getAmountDue(),
]);

(I capture the charge later)

According to stripe doc and also cartalyst/stripe (I assume is the same for cartalyst/stripe-laravel) I need to completely change the workflow of payments switching to payments intents, right?

e.g.

$paymentIntent = $stripe->paymentIntents()->create([
    'amount' => 2000,
    'currency' => 'usd',
    'payment_method_types' => [
        'card',
    ],
]);

I also assume that cartalyst/stripe-laravel v7 support intents.