#jojana_code

1 messages ¡ Page 1 of 1 (latest)

proper pythonBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1291270075692613672

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

bronze pumice
#

That means the card issuer bank asked for 3DS

#

When you created this PI, can you pass off_session = true and confirm = true?

vale rose
bronze pumice
#

Okie that's the India regulation. Are you using Test card on Test mode?

#

Your customer should have a name and an address

#

The Doc pretty much explained it

vale rose
#

okay. I'm just follow as per the document. but it shows another error like this
Your card was declined. This transaction requires authentication.

#

I'm using Test card on Test mode only

bronze pumice
#

okie can you share the PI

vale rose
#

if (is_null($user->stripe_customer_id)) {
$customer = Customer::create([
'email' => $user->email,
'name' => $user->name,
'address' => [
'line1' => '510 Townsend St',
'postal_code' => '98140',
'city' => 'San Francisco',
'state' => 'CA',
'country' => 'US',
],
]);
$user->stripe_customer_id = $customer->id;
$user->save();
} else {
$customer = Customer::retrieve($user->stripe_customer_id);
}

    // Create a SetupIntent to save card details
    $setupIntent = SetupIntent::create([
        'customer' => $user->stripe_customer_id, 
        'payment_method_types' => ['card'],
    ]);

$paymentIntent = PaymentIntent::create([
'amount' => 1000, // Amount in cents
'currency' => 'usd',
'payment_method' => $paymentMethod->id,
'customer' => $user->stripe_customer_id, // Get this from your user data
'off_session' => true, // Indicate that the payment is off-session
'confirm' => true, // Attempt to confirm the payment
'description' => 'Booking service for [description of service or goods]', // Required description field
'payment_method_options' => [
'card' => [
'request_three_d_secure' => 'automatic', // Minimize 3D Secure requests
],
],
]);

this is what i'm trying to create payment Intent

bronze pumice
#

Wait but you haven't confirmed the SetupIntent

#

Did you?

vale rose
#

yes. But how can confirmed the setupIntent

#

const { setupIntent, error } = await stripe.confirmCardSetup(
clientSecret, {
payment_method: {
card: cardElement,
billing_details: { name: document.getElementById('card-holder-name').value }
}
}
);

I confirmed the setupIntent in my javascripts

bronze pumice
#

Alright that looks fine

#

can you share the PaymentIntent Id?

#

pi_xxx

vale rose
#

pi_3Q5iEOSGVeGeY8h510ihCon3

bronze pumice