#pradeep_gururani-test-card
1 messages · Page 1 of 1 (latest)
Hey, no that test card does not require 3DS/auth
These are the cards you want to use to test 3DS: https://stripe.com/docs/testing#regulatory-cards
hey, I get a modal like 3d secure for a brief second in my implementation, I'm assuming its a 3d secure modal ?
That's just part of the Stripe.js confirmation flow. It's expected that it dismiss automatically as no 3DS is required. How are you confirming the Payment Intent?
Can you share the pi_xxx you're confirming?
okay
pi_3LexA5EUdH8iAtR718J2qfdT
amount: data.amount,
currency: process.env.PAYMENT_CURRENCY,
payment_method_types: ['card'],
customer: data.customer, // intent customer id
payment_method: data.payment_method, // payment token
confirm: true,
save_payment_method: true,
setup_future_usage: 'off_session',
receipt_email: data.receipt_email
};
stripeObj.paymentIntents.create(paymentIntentRequest).then(response => {
if (_.has(response, 'status') && response.status === 'requires_action' || response.status === 'requires_payment_method') {
resp.data = {
confirmation_required: true,
payment_intent_id: response.id,
client_secret: response.client_secret,
three_d_secure_usage: _.has(response, 'three_d_secure_usage') ? response.three_d_secure_usage : {},
customer: response.customer,
payment_method: response.payment_method,
error: {}
};
resp.status = false;
hook.app.debug('ChargePaymentIntent - authentication required', resp.data);
resp.err = 'È richiesta l’autenticazione della carta.';
resolve(resp);
} ```
this is the place where I'm creating the paymentIntent
PI was confirmed successfully, not sure I'm understanding the ask
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!
hey, we're also getting the confirmation_required: true in case of the *4242 test card
if we're getting confirmation_required for all the cases, then how we can test the non-sca test cards ?
"status": false,
"data": {
"confirmation_required": true,
"payment_intent_id": "pi_3Lex1gEUdH8iAtR71lb4B3o8",
"client_secret": "pi_3Lex1gEUdH8iAtR71lb4B3o8_secret_3jMHzYNNO7czpvTc31pzrHiPi",
"three_d_secure_usage": {},
"customer": "cus_MNhVkUqg5czXnC",
"payment_method": "pm_1Lew6MEUdH8iAtR70fHjoOUW",
"error": {},
"id": 22905
},
"err": "È richiesta l’autenticazione della carta."
}```
we get the above response for the test card *4242
Sorry for my late replay, juste give me couple of minutes while analzying your request
Sorry for my late reply
The payment Intent pi_3Lex1gEUdH8iAtR71lb4B3o8 you are sharing is in successful status
If you want to test sca test cards, you can refer to one of these cards:
https://stripe.com/docs/testing#authentication-and-setup
You'll have next_action field in the result PaymentIntent https://stripe.com/docs/api/payment_intents/object#payment_intent_object-next_action
With a requires_action status https://stripe.com/docs/api/payment_intents/object#payment_intent_object-status:~:text=%2C requires_confirmation%2C-,requires_action,-%2C processing%2C
no worries
can you please help with this type of response of the stripe test card *4242
what help are you looking for exactly?
hey, about the above response, is this normal response in case of non sca test card (ex- *4242)
not sure, that is the response from your own backend server, I can't say anything about it.
{
"id": "pi_3LezjREUdH8iAtR71gvGtx5S",
"object": "payment_intent",
"amount": 1999,
"amount_capturable": 0,
"amount_details": {
"tip": {}
},
"amount_received": 0,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "automatic",
"charges": {
"object": "list",
"data": [],
"has_more": false,
"total_count": 0,
"url": "/v1/charges?payment_intent=pi_3LezjREUdH8iAtR71gvGtx5S"
},
"client_secret": "pi_3LezjREUdH8iAtR71gvGtx5S_secret_h5rmBKnkfQD62XvJZEd3j2GyK",
"confirmation_method": "automatic",
"created": 1662462857,
"currency": "eur",
"customer": "cus_MNhVkUqg5czXnC",
"description": null,
"invoice": null,
"last_payment_error": null,
"livemode": false,
"metadata": {},
"next_action": {
"type": "use_stripe_sdk",
"use_stripe_sdk": {
"source": "src_1LezjREUdH8iAtR7JNwY5NWz",
"stripe_js": "https://hooks.stripe.com/redirect/authenticate/src_1LezjREUdH8iAtR7JNwY5NWz?client_secret=src_client_secret_S2xvyRmlnLGAPHks1wpBHVjp&source_redirect_slug=test_YWNjdF8xN0hiSkJFVWRIOGlBdFI3LF9NTmxGMzEySVlEZ2RkVHNKeTdkdFBoNEVadjlyczdQ0100Med4g7e4",
"type": "three_d_secure_redirect"
}
},
"on_behalf_of": null,
"payment_method": "pm_1Lew6MEUdH8iAtR70fHjoOUW",
"payment_method_options": {
"card": {
"installments": null,
"mandate_options": null,
"network": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"processing": null,
"receipt_email": "test123+123sep06@mailinator.com",
"review": null,
"setup_future_usage": "off_session",
"shipping": null,
"source": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"status": "requires_action",
"transfer_data": null,
"transfer_group": null
}
this is the response form the stripe
that's a PaymentIntent that requires 3D Secure so the next step would be to confirm it on the frontend.
you have "Request 3DS if 3D Secure is supported for card" turned on at https://dashboard.stripe.com/test/settings/radar/rules so that's expected
you're using our Radar settings to force 3D Secure to happen on any card that supports it, which includes the 4242 card
okay, so we'll have to handle the different response in case of non SCA cards on our code right ?
if you want to test it you could try turning off that setting temporarily in test mode and see what the PaymentIntent does when using that card and not needing 3DS
okay, is there a way to check whether a card supports 3D Secure when the customer enters the card details ?
no, you can't know that. The bank decides if 3D Secure is needed, when a charge is attempted.
okay, thanks