Cs-cart regional redirect incompatable with stripe connect payment successful webhook

cs-cart multivendor ultimate V 20.1
Stripe Connect Payments V 1.0

Payment status does not change to paid when the storefront regional direct (settings/storefronts/regions) has a country (in this case Australia) as it’s only destination.

CS-Cart’s regional storefront redirection is intercepting the Stripe webhook.

  • Storefronts “Redirect visitors based on country” enabled and are assigned to Australia.
  • Stripe’s user-agent is not treated as a crawler, so CS-Cart applies the source-IP country redirect before dispatching the webhook controller.

A live POST using Stripe’s actual user-agent returned: 302 Location: [store front web address]

Stripe considers any 3xx webhook response a failed delivery. Stripe webhook documentation (Registrieren Sie Stripe-Ereignisse in Ihrem Webhook-Endpoint | Stripe-Dokumentation)

The redirect originates in /app/functions/fn.init.php:1416. Only the conventional payment_notification controller is exempted at /app/functions/fn.init.php:1399; stripe_connect_webhook is not.

The webhook never reaches /app/addons/stripe_connect/controllers/frontend/stripe_connect_webhook.php:20, so the success handler never executes app/addons/stripe_connect/Tygh/Addons/StripeConnect/Webhook/Handlers/PaymentIntentSucceeded.php:77.

Hello

Quick core patch in fn_get_regional_redirection_rules()
return [
‘payment_notification’ => false,
‘stripe_connect_webhook’ => false,
];

Not tested

Have a nice day

Best regards
Robert

1 Like

Quik-Draw McGraw!

thx.

Hello

You are welcome :slight_smile:

Best regards
Robert

Thank you for reporting this issue.

I have forwarded it to our development team for review. They will investigate the reported behavior and evaluate an appropriate solution for inclusion in a future CS-Cart version.

We appreciate your detailed findings.

1 Like