Skip to content

Validation process start too quickly and, sometime, PaymentIntent status is not yet switched from requires_action to successful (or failed) on Stripe side. #85

@dffych

Description

@dffych

Here is a failure log from Logger (in controllers/front/validation.php) :

[21:26:09.0909] [PSw8hwxv6kEd] Payment validation start
[21:26:09.0909] [PSw8hwxv6kEd] Payment method id: twint
[21:26:10.1010] [PSw8hwxv6kEd] Payment method: Twint
[21:26:10.1010] [PSw8hwxv6kEd] Stored payment metadata: {"type":1,"methodId":"twint","ts":1738959912,"cartId":52972,"cartTotal":3770,"id":"pi_3Qpy6tKv8gH7Fpoo1JPKsgQq"}
[21:26:10.1010] [PSw8hwxv6kEd] Payment intent id: pi_3Qpy6tKv8gH7Fpoo1JPKsgQq
[21:26:10.1010] [PSw8hwxv6kEd] Successfully fetched payment intent data, status = 'requires_action'
[21:26:10.1010] [PSw8hwxv6kEd] ERROR: Payment intent has invalid status: Stripe\PaymentIntent JSON: {

For this, PaymentIntent pass successful at 21:26:12

Here is a success log from Logger (in controllers/front/validations.php) :

[13:16:18.1818] [jNgTYCh2h84r] Payment method id: twint
[13:16:18.1818] [jNgTYCh2h84r] Payment method: Twint
[13:16:18.1818] [jNgTYCh2h84r] Stored payment metadata: {"type":1,"methodId":"twint","ts":1739016923,"cartId":1066,"cartTotal":1995,"id":"pi_3QqCwQAA9k5nMCxc1yy6sf4c"}
[13:16:18.1818] [jNgTYCh2h84r] Payment intent id: pi_3QqCwQAA9k5nMCxc1yy6sf4c
[13:16:19.1919] [jNgTYCh2h84r] Successfully fetched payment intent data, status = 'succeeded'
[13:16:19.1919] [jNgTYCh2h84r] Processing payment
[13:16:19.1919] [jNgTYCh2h84r] Processing latest charge: py_3QqCwQAA9k5nMCxc1T2NwAqP

For this, PaymentIntent pass successful at 13:16:18

I think, in controllers/front/validation.php, lines 167 to 174, the $api->getPaymentIntent($paymentIntentId) should either be delay some seconds nor looped until status changed from requires_action to successful or failed

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions