Split PayPal hosted checkout flow

This commit is contained in:
QLHazyCoder
2026-05-20 10:03:56 +08:00
parent 886d4c1297
commit aa8025cb76
8 changed files with 1214 additions and 146 deletions
+21
View File
@@ -10616,6 +10616,12 @@ const AUTO_RUN_BACKGROUND_COMPLETED_STEP_KEYS = new Set([
'fetch-signup-code',
'wait-registration-success',
'plus-checkout-create',
'paypal-hosted-openai-checkout',
'paypal-hosted-email',
'paypal-hosted-verification',
'paypal-hosted-card',
'paypal-hosted-create-account',
'paypal-hosted-review',
'plus-checkout-billing',
'paypal-approve',
'plus-checkout-return',
@@ -11715,6 +11721,12 @@ const AUTO_RUN_NODE_DELAYS = Object.freeze({
'fill-profile': 0,
'wait-registration-success': 3000,
'plus-checkout-create': 3000,
'paypal-hosted-openai-checkout': 2000,
'paypal-hosted-email': 2000,
'paypal-hosted-verification': 2000,
'paypal-hosted-card': 2000,
'paypal-hosted-create-account': 2000,
'paypal-hosted-review': 2000,
'plus-checkout-billing': 2000,
'gopay-subscription-confirm': 2000,
'paypal-approve': 2000,
@@ -13443,8 +13455,11 @@ const plusCheckoutCreateExecutor = self.MultiPageBackgroundPlusCheckoutCreate?.c
createAutomationTab,
ensureContentScriptReadyOnTabUntilStopped,
fetch: typeof fetch === 'function' ? fetch.bind(globalThis) : null,
getTabId,
getState,
isTabAlive,
markCurrentRegistrationAccountUsed,
queryTabsInAutomationWindow,
registerTab,
sendTabMessageUntilStopped,
setState,
@@ -13727,6 +13742,12 @@ const stepExecutorsByKey = {
'fill-profile': (state) => step5Executor.executeStep5(state),
'wait-registration-success': (state) => step6Executor.executeStep6(state),
'plus-checkout-create': (state) => plusCheckoutCreateExecutor.executePlusCheckoutCreate(state),
'paypal-hosted-openai-checkout': (state) => plusCheckoutCreateExecutor.executePayPalHostedOpenAiCheckout(state),
'paypal-hosted-email': (state) => plusCheckoutCreateExecutor.executePayPalHostedEmail(state),
'paypal-hosted-verification': (state) => plusCheckoutCreateExecutor.executePayPalHostedVerification(state),
'paypal-hosted-card': (state) => plusCheckoutCreateExecutor.executePayPalHostedCard(state),
'paypal-hosted-create-account': (state) => plusCheckoutCreateExecutor.executePayPalHostedCreateAccount(state),
'paypal-hosted-review': (state) => plusCheckoutCreateExecutor.executePayPalHostedReview(state),
'plus-checkout-billing': (state) => plusCheckoutBillingExecutor.executePlusCheckoutBilling(state),
'gopay-subscription-confirm': (state) => goPayManualConfirmExecutor.executeGoPayManualConfirm(state),
'paypal-approve': (state) => normalizePlusPaymentMethod(state?.plusPaymentMethod) === PLUS_PAYMENT_METHOD_GOPAY