You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(plugin-ecommerce): support custom Stripe HTTP clients - #17337
forward the configured client to Stripe instances used by payment initiation, order confirmation, and webhook handlers
document Stripe.createFetchHttpClient() for fetch-only runtimes
add focused unit coverage for all three Stripe construction paths and the existing default behavior
Why
Some Cloudflare Workers deployments bundle Stripe through its Node entrypoint. In that case Stripe selects its Node HTTP client, which is not usable in fetch-only runtimes and can leave payment requests hanging.
This change provides a narrow escape hatch without changing the default Stripe client for existing Node deployments.
pnpm exec vitest run --project unit packages/plugin-ecommerce — 141 tests passed
focused Stripe adapter tests — 9 tests passed
pnpm run build:plugin-ecommerce
package ESLint and Prettier checks
git diff --check
Remaining validation
The change was not exercised against a live workerd deployment. Unit coverage verifies that the caller-provided fetch client reaches every Stripe SDK instance created by the adapter.
CI note after rebasing onto current main to trigger the previously approval-blocked full workflow: build, lint, and 166 checks are passing.
LexicalFullyFeatured failed during Payload initialization with the shared transient MongoDB catalog-change error (payload._array-fields_versions, payloadInitError: true). The editor was then absent across the retries, before the suite logic could exercise this plugin-ecommerce patch. The same initialization signature occurred concurrently across #17337, #17354, #17355, #17371, and #17372, whose diffs are unrelated. All Green is only the aggregate failure.
No patch change is indicated by these logs. A maintainer rerun of the failed E2E job would be appreciated.
CI note for rebased head bf9c556467: the complete plugin-ecommerce unit suite passes (141/141), the full plugin build and format checks pass, and workflow build/unit/type checks are green. The only failed shards are unrelated tests: MongoDB Atlas locked-document teardown (test/locked-documents/int.spec.ts:78) and Firestore auto-cron scheduling (test/queues/schedules-autocron.int.spec.ts:102). This PR changes only the plugin-ecommerce Stripe HTTP client wiring, tests, and docs.
I attempted gh run rerun --failed, but upstream returned Must have admin rights to Repository. A maintainer rerun of the failed shards would be appreciated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
httpClienttoStripeAdapterArgsStripe.createFetchHttpClient()for fetch-only runtimesWhy
Some Cloudflare Workers deployments bundle Stripe through its Node entrypoint. In that case Stripe selects its Node HTTP client, which is not usable in fetch-only runtimes and can leave payment requests hanging.
This change provides a narrow escape hatch without changing the default Stripe client for existing Node deployments.
Fixes #17201.
Validation
pnpm exec vitest run --project unit packages/plugin-ecommerce— 141 tests passedpnpm run build:plugin-ecommercegit diff --checkRemaining validation
The change was not exercised against a live
workerddeployment. Unit coverage verifies that the caller-provided fetch client reaches every Stripe SDK instance created by the adapter.