#dacoin

1 messages · Page 1 of 1 (latest)

rancid salmonBOT
torpid brook
#

Hello! Can you paste your other message in this thread please?

heavy ore
#

My flow is not the basic one.

Backend side, I create the invoice with items and return the PI that contains:

  "id": "pi_3NEb6wDLjBWvJBYP1OGaDzzh",
  "object": "payment_intent",
...
  "payment_method_types": [
    "card",
    "paypal",
    "sepa_debit"
  ],

(See the paypal entry that new I suppose)

Frontend side (CardElement & latest @stripe/react-stripe-js), I do:

    // PaymentIntent?
    const { error } = await stripe.confirmCardPayment(client_secret, {

      payment_method: {
        card: stripeElements.getElement(CardElement),
        billing_details: {
          name: checkoutFormValues.cardName,
         },
      },
      ...(checkoutFormValues.cardSave &&
        { setup_future_usage: 'on_session' }),
    })

The confirmPayment know that I use/want the payment_method_type card and not paypal at final for pay this invoice (it has the expected_payment_method_type: 'card' right filled in the exception) so I don't understand why it throw the exception :/

Any suggestion? Thanks

#

Sure 🙂 done.

torpid brook
#

Hmm... give me a few minutes to look into this

heavy ore
torpid brook
heavy ore
#

No, I just tried to enable paypal on the test mode only earlier to see if it's fix the issue.

torpid brook
#

Yeah I believe you need to enable that setting for paypal to work with setup_future_usage

heavy ore
#

The fact that the invoice list paypal as payment type why not, even if I didn't enabled it earlier, but it's weird that if I want pay with a card, it should ignore the paypal payment type, and allow the setup_future_usage. Sound like a bug

#

I can avoid the use of setup_future_usage: 'on_session' during a time.

But from my point of view, maybe create 2 issues on your side to
1 - do no list paypal as payment type in invoice if paypal integration is not enabled.
2- do not throw error about setup_future_usage if a confirmCardPayment is used with it, even if paypal integration is enabled (Because paypal is not concerned. it as its own confirmPayPalPayment from what I see)

wdyt?

torpid brook
#

Sorry been a bit busy in the channel -

heavy ore
#

no problem

torpid brook
#

1 - do no list paypal as payment type in invoice if paypal integration is not enabled.
paypal is still a valid payment method for the invoice - it's just not a valid payment method for a payment if you're ALSO using it with setup_future_usage. Is setup_future_usage something you're passing in yourself during confirmation? That would explain the mismatch

#

What that does is it ONLY does setup_future_usage for the card payment method