From 386f71b460edebf6ca06006188c1efb8e021b791 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 7 Oct 2026 15:22:48 +0000 Subject: [PATCH] chore: sync storefront from monorepo Source: coded-letter/coded-letter-monorepo@1b9eab75b17cfb62a043955b858ca846d00ac745 --- apps/storefront/src/lib/backendCheckoutContext.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/storefront/src/lib/backendCheckoutContext.test.ts b/apps/storefront/src/lib/backendCheckoutContext.test.ts index 1395a0f..66b0b25 100644 --- a/apps/storefront/src/lib/backendCheckoutContext.test.ts +++ b/apps/storefront/src/lib/backendCheckoutContext.test.ts @@ -72,7 +72,7 @@ test("BLIK reconciliation verifies Stripe and uses Woo Stripe's webhook handler" assert.match(checkoutContext, /hash_equals\(\s*\(string\) \$order->get_order_key\(\),\s*\(string\) \$order_key\s*\)/); }); -test("verified succeeded BLIK charges fall back to Woo Stripe's native order response handler", () => { +test("verified succeeded BLIK charges complete pending orders even when webhook handling defers", () => { assert.match(checkoutContext, /function funkycommerce_process_verified_blik_charge/); assert.match(checkoutContext, /\$gateway\s*=\s*\$gateways\['stripe'\]/); assert.match(checkoutContext, /'succeeded' !== \( \$charge->status \?\? '' \)/); @@ -80,7 +80,8 @@ test("verified succeeded BLIK charges fall back to Woo Stripe's native order res assert.match(checkoutContext, /\$gateway->process_response\( \$charge, \$order \)/); assert.match(checkoutContext, /validate_intent_for_order/); assert.match(checkoutContext, /\$deferred = true === \$handler->process_payment_intent/); - assert.match(checkoutContext, /if \( 'succeeded' === \$intent_status && ! \$deferred && ! \$order->is_paid\(\) \)/); + assert.match(checkoutContext, /if \( 'succeeded' === \$intent_status && ! \$order->is_paid\(\) \)/); + assert.match(checkoutContext, /if \( 'succeeded' === \$intent_status && ! \$order->is_paid\(\) \) \{\s*throw new \\RuntimeException\( 'The verified BLIK charge did not complete its WooCommerce order\.' \);/); assert.match(checkoutContext, /funkycommerce_process_verified_blik_charge\( \$order, \$intent \)/); assert.match(checkoutContext, /'payment_follow_up_required'\s*=>\s*true/); assert.match(orderSuccessPage, /payment_follow_up_required === true/);