#pradeep_gururani-test-card

1 messages · Page 1 of 1 (latest)

fringe bluff
#

Hey, no that test card does not require 3DS/auth

cyan spade
fringe bluff
#

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?

cyan spade
#

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

fringe bluff
#

PI was confirmed successfully, not sure I'm understanding the ask

paper flame
#

Hey, taking over here. Let me know if there's any follow-up Qs I can answer!

cyan spade
#

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

paper flame
#

Sorry for my late replay, juste give me couple of minutes while analzying your request

paper flame
#

Sorry for my late reply

#

The payment Intent pi_3Lex1gEUdH8iAtR71lb4B3o8 you are sharing is in successful status

cyan spade
#

no worries

cyan spade
ruby kiln
#

what help are you looking for exactly?

cyan spade
#

hey, about the above response, is this normal response in case of non sca test card (ex- *4242)

ruby kiln
#

not sure, that is the response from your own backend server, I can't say anything about it.

cyan spade
#

{
"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

ruby kiln
#

that's a PaymentIntent that requires 3D Secure so the next step would be to confirm it on the frontend.

cyan spade
#

but I'm using a test card *4242

#

does this card also requires 3D Secure

ruby kiln
#

you're using our Radar settings to force 3D Secure to happen on any card that supports it, which includes the 4242 card

cyan spade
#

okay, so we'll have to handle the different response in case of non SCA cards on our code right ?

ruby kiln
#

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

cyan spade
#

okay, is there a way to check whether a card supports 3D Secure when the customer enters the card details ?

ruby kiln
#

no, you can't know that. The bank decides if 3D Secure is needed, when a charge is attempted.

cyan spade
#

okay, thanks