#callmarl - retry payment

1 messages ยท Page 1 of 1 (latest)

floral kindle
#

Hey there, what is the error you're encountering?

#

DO you have a request ID as an example of this I can look at?

#

eg req_123

warped belfry
#
req_oMp2QesikIBnjl
#

The problem is the looking view check for the status requires_action

#
        if intent.status == "requires_action" :
            # Return 3Dsec template
            return render(request, self.secure_template)

But it's look the status is requires_payment_method

rustic narwhal
#

Hello ๐Ÿ‘‹
Taking over for synthrider here
Give me a moment to catch up on the thread ๐Ÿ™‚

warped belfry
#

No problem

rustic narwhal
#

So it seems like the card was declined
Can you try using a different card?

warped belfry
#

It's in test mode with : 4000000000003063

#

It's to test the 3Dsecure behaviour

#

Objective is :
At first to trying to pay in backend task with the default card (in this step paiement should failed)
Then retrieve the failed invoice in user account to pay it with default user card (the manual retry should ask for 3Dsec and succeed)

#

The problem is in stripe paiementIntent i'm giving the id card_1KZCmDHCUoSCLMBk0ttk7Duf but the status returned by the api is requires_payment_method wherease I expect requires_action

rustic narwhal
#

Ah I see.
Let me take a look

warped belfry
#

Ok thank you

#

Oh I just solve it I forgot the rule off_session

    return stripe.PaymentIntent.confirm(
        s_subscription.latest_invoice.payment_intent.id,
        payment_method              = s_subscription.default_payment_method,
        off_session                          = False,
        setup_future_usage          = "off_session"
        )
#

Thank you

rustic narwhal
#

Oh I missed that ๐Ÿ˜ฎโ€๐Ÿ’จ
Glad that you were able to figure it out ๐Ÿ˜„

warped belfry
#

Thank you again and sorry for the inconvenience

#

๐Ÿ™‚