From b58296378a35dacf9e407d44bee5c0295323bd0a Mon Sep 17 00:00:00 2001 From: Dev Date: Thu, 5 Nov 2026 03:26:34 +0100 Subject: [PATCH] Keep single-provider subscription checkout inside method selection --- .../azuriom/native-subscribe-flow.patch | 17 +++++++++++++++++ .../azuriom/subscribe-flow-test.php | 6 ++++++ 2 files changed, 23 insertions(+) create mode 100644 website/integrations/azuriom/native-subscribe-flow.patch create mode 100644 website/integrations/azuriom/subscribe-flow-test.php diff --git a/website/integrations/azuriom/native-subscribe-flow.patch b/website/integrations/azuriom/native-subscribe-flow.patch new file mode 100644 index 00000000..053656b1 --- /dev/null +++ b/website/integrations/azuriom/native-subscribe-flow.patch @@ -0,0 +1,17 @@ +--- a/plugins/shop/src/Controllers/SubscriptionController.php ++++ b/plugins/shop/src/Controllers/SubscriptionController.php +@@ -37,13 +37,7 @@ + ->filter(fn (Gateway $gateway) => $gateway->isSupported()) + ->filter(fn (Gateway $gateway) => $gateway->paymentMethod()->supportsSubscriptions()); + +- // If there is only one payment gateway, redirect to it directly +- if ($gateways->count() === 1) { +- $gateway = $gateways->first(); +- +- return $gateway->paymentMethod()->startSubscription($user, $package); +- } +- ++ // Subscription provider selection must stay inside the storefront too. + return view('shop::payments.pay', [ + 'gateways' => $gateways, + 'route' => fn (string $gateway) => route('shop.subscriptions.subscribe', [ diff --git a/website/integrations/azuriom/subscribe-flow-test.php b/website/integrations/azuriom/subscribe-flow-test.php new file mode 100644 index 00000000..10b79b0a --- /dev/null +++ b/website/integrations/azuriom/subscribe-flow-test.php @@ -0,0 +1,6 @@ +selectGateway(new \Illuminate\Http\Request,$p);assert($result[0]==='shop::payments.pay');$url=$result[1]['route']('stripe');if($result[0]!=='shop::payments.pay'||$url[0]!=='shop.subscriptions.subscribe'||$url[1]['package']!==$p||$url[1]['gateway']!=='stripe')throw new Exception('Wrong subscription selection');echo "Single-provider selection and bound subscription route verified without provider/payment calls.\n";}