@easypayment/medusa-payment-paypal 1.2.2 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.medusa/server/src/admin/index.js +390 -136
- package/.medusa/server/src/admin/index.mjs +390 -136
- package/.medusa/server/src/api/admin/payment-collections/[id]/payment-sessions/route.d.ts +1 -0
- package/.medusa/server/src/api/admin/payment-collections/[id]/payment-sessions/route.d.ts.map +1 -1
- package/.medusa/server/src/api/admin/payment-collections/[id]/payment-sessions/route.js +5 -1
- package/.medusa/server/src/api/admin/payment-collections/[id]/payment-sessions/route.js.map +1 -1
- package/.medusa/server/src/api/admin/paypal/disconnect/route.d.ts +1 -0
- package/.medusa/server/src/api/admin/paypal/disconnect/route.d.ts.map +1 -1
- package/.medusa/server/src/api/admin/paypal/disconnect/route.js +1 -0
- package/.medusa/server/src/api/admin/paypal/disconnect/route.js.map +1 -1
- package/.medusa/server/src/api/admin/paypal/environment/route.d.ts +2 -0
- package/.medusa/server/src/api/admin/paypal/environment/route.d.ts.map +1 -1
- package/.medusa/server/src/api/admin/paypal/environment/route.js +2 -0
- package/.medusa/server/src/api/admin/paypal/environment/route.js.map +1 -1
- package/.medusa/server/src/api/admin/paypal/onboard-complete/route.d.ts +9 -0
- package/.medusa/server/src/api/admin/paypal/onboard-complete/route.d.ts.map +1 -1
- package/.medusa/server/src/api/admin/paypal/onboard-complete/route.js +9 -4
- package/.medusa/server/src/api/admin/paypal/onboard-complete/route.js.map +1 -1
- package/.medusa/server/src/api/admin/paypal/onboarding-link/route.d.ts +7 -1
- package/.medusa/server/src/api/admin/paypal/onboarding-link/route.d.ts.map +1 -1
- package/.medusa/server/src/api/admin/paypal/onboarding-link/route.js +9 -2
- package/.medusa/server/src/api/admin/paypal/onboarding-link/route.js.map +1 -1
- package/.medusa/server/src/api/admin/paypal/onboarding-status/route.d.ts +1 -0
- package/.medusa/server/src/api/admin/paypal/onboarding-status/route.d.ts.map +1 -1
- package/.medusa/server/src/api/admin/paypal/onboarding-status/route.js +1 -0
- package/.medusa/server/src/api/admin/paypal/onboarding-status/route.js.map +1 -1
- package/.medusa/server/src/api/admin/paypal/save-credentials/route.d.ts +1 -0
- package/.medusa/server/src/api/admin/paypal/save-credentials/route.d.ts.map +1 -1
- package/.medusa/server/src/api/admin/paypal/save-credentials/route.js +10 -3
- package/.medusa/server/src/api/admin/paypal/save-credentials/route.js.map +1 -1
- package/.medusa/server/src/api/admin/paypal/settings/route.d.ts +2 -0
- package/.medusa/server/src/api/admin/paypal/settings/route.d.ts.map +1 -1
- package/.medusa/server/src/api/admin/paypal/settings/route.js +9 -2
- package/.medusa/server/src/api/admin/paypal/settings/route.js.map +1 -1
- package/.medusa/server/src/api/admin/paypal/status/route.d.ts +4 -0
- package/.medusa/server/src/api/admin/paypal/status/route.d.ts.map +1 -1
- package/.medusa/server/src/api/admin/paypal/status/route.js +9 -1
- package/.medusa/server/src/api/admin/paypal/status/route.js.map +1 -1
- package/.medusa/server/src/api/store/payment-collections/[id]/payment-sessions/route.d.ts +4 -0
- package/.medusa/server/src/api/store/payment-collections/[id]/payment-sessions/route.d.ts.map +1 -1
- package/.medusa/server/src/api/store/payment-collections/[id]/payment-sessions/route.js +5 -0
- package/.medusa/server/src/api/store/payment-collections/[id]/payment-sessions/route.js.map +1 -1
- package/.medusa/server/src/api/store/paypal/capture-order/route.d.ts +8 -0
- package/.medusa/server/src/api/store/paypal/capture-order/route.d.ts.map +1 -1
- package/.medusa/server/src/api/store/paypal/capture-order/route.js +23 -3
- package/.medusa/server/src/api/store/paypal/capture-order/route.js.map +1 -1
- package/.medusa/server/src/api/store/paypal/config/route.d.ts +5 -0
- package/.medusa/server/src/api/store/paypal/config/route.d.ts.map +1 -1
- package/.medusa/server/src/api/store/paypal/config/route.js +12 -5
- package/.medusa/server/src/api/store/paypal/config/route.js.map +1 -1
- package/.medusa/server/src/api/store/paypal/create-order/route.d.ts +8 -0
- package/.medusa/server/src/api/store/paypal/create-order/route.d.ts.map +1 -1
- package/.medusa/server/src/api/store/paypal/create-order/route.js +54 -20
- package/.medusa/server/src/api/store/paypal/create-order/route.js.map +1 -1
- package/.medusa/server/src/api/store/paypal/onboard-return/route.d.ts.map +1 -1
- package/.medusa/server/src/api/store/paypal/onboard-return/route.js +19 -19
- package/.medusa/server/src/api/store/paypal/onboard-return/route.js.map +1 -1
- package/.medusa/server/src/api/store/paypal/settings/route.d.ts +1 -0
- package/.medusa/server/src/api/store/paypal/settings/route.d.ts.map +1 -1
- package/.medusa/server/src/api/store/paypal/settings/route.js +4 -1
- package/.medusa/server/src/api/store/paypal/settings/route.js.map +1 -1
- package/.medusa/server/src/api/store/paypal/webhook/route.d.ts +7 -0
- package/.medusa/server/src/api/store/paypal/webhook/route.d.ts.map +1 -1
- package/.medusa/server/src/api/store/paypal/webhook/route.js +34 -3
- package/.medusa/server/src/api/store/paypal/webhook/route.js.map +1 -1
- package/.medusa/server/src/api/store/paypal-complete/route.d.ts +8 -0
- package/.medusa/server/src/api/store/paypal-complete/route.d.ts.map +1 -1
- package/.medusa/server/src/api/store/paypal-complete/route.js +33 -6
- package/.medusa/server/src/api/store/paypal-complete/route.js.map +1 -1
- package/.medusa/server/src/api/utils/rate-limit.d.ts +4 -0
- package/.medusa/server/src/api/utils/rate-limit.d.ts.map +1 -1
- package/.medusa/server/src/api/utils/rate-limit.js +9 -4
- package/.medusa/server/src/api/utils/rate-limit.js.map +1 -1
- package/.medusa/server/src/jobs/paypal-webhook-retry.d.ts +5 -0
- package/.medusa/server/src/jobs/paypal-webhook-retry.d.ts.map +1 -1
- package/.medusa/server/src/jobs/paypal-webhook-retry.js +13 -2
- package/.medusa/server/src/jobs/paypal-webhook-retry.js.map +1 -1
- package/.medusa/server/src/modules/paypal/index.d.ts +1 -0
- package/.medusa/server/src/modules/paypal/index.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/index.js +1 -0
- package/.medusa/server/src/modules/paypal/index.js.map +1 -1
- package/.medusa/server/src/modules/paypal/migrations/20260115120000_create_paypal_connection.js +22 -22
- package/.medusa/server/src/modules/paypal/migrations/20260123090000_create_paypal_settings.js +11 -11
- package/.medusa/server/src/modules/paypal/migrations/20260201090000_create_paypal_webhook_event.js +18 -18
- package/.medusa/server/src/modules/paypal/migrations/20260401090000_create_paypal_metric.js +16 -16
- package/.medusa/server/src/modules/paypal/migrations/20260701090000_add_paypal_webhook_event_processing.js +20 -20
- package/.medusa/server/src/modules/paypal/migrations/20261101090000_remove_paypal_reconciliation_status.js +14 -14
- package/.medusa/server/src/modules/paypal/migrations/20261201090000_remove_paypal_audit_log.js +15 -15
- package/.medusa/server/src/modules/paypal/migrations/20270101090000_set_paypal_environment_default_live.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/migrations/20270101090000_set_paypal_environment_default_live.js.map +1 -1
- package/.medusa/server/src/modules/paypal/migrations/20270102090000_add_paypal_seller_email.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/migrations/20270102090000_add_paypal_seller_email.js.map +1 -1
- package/.medusa/server/src/modules/paypal/migrations/20270103090000_add_paypal_seller_merchant_id.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/migrations/20270103090000_add_paypal_seller_merchant_id.js.map +1 -1
- package/.medusa/server/src/modules/paypal/migrations/20270201000000_add_webhook_dead_letter.js +6 -6
- package/.medusa/server/src/modules/paypal/models/paypal_connection.d.ts +5 -0
- package/.medusa/server/src/modules/paypal/models/paypal_connection.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/models/paypal_connection.js +5 -0
- package/.medusa/server/src/modules/paypal/models/paypal_connection.js.map +1 -1
- package/.medusa/server/src/modules/paypal/models/paypal_metric.d.ts +4 -0
- package/.medusa/server/src/modules/paypal/models/paypal_metric.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/models/paypal_metric.js +4 -0
- package/.medusa/server/src/modules/paypal/models/paypal_metric.js.map +1 -1
- package/.medusa/server/src/modules/paypal/models/paypal_settings.d.ts +5 -0
- package/.medusa/server/src/modules/paypal/models/paypal_settings.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/models/paypal_settings.js +5 -0
- package/.medusa/server/src/modules/paypal/models/paypal_settings.js.map +1 -1
- package/.medusa/server/src/modules/paypal/models/paypal_webhook_event.d.ts +7 -0
- package/.medusa/server/src/modules/paypal/models/paypal_webhook_event.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/models/paypal_webhook_event.js +7 -0
- package/.medusa/server/src/modules/paypal/models/paypal_webhook_event.js.map +1 -1
- package/.medusa/server/src/modules/paypal/payment-provider/base-provider.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/payment-provider/base-provider.js.map +1 -1
- package/.medusa/server/src/modules/paypal/payment-provider/card-service.d.ts +14 -6
- package/.medusa/server/src/modules/paypal/payment-provider/card-service.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/payment-provider/card-service.js +55 -32
- package/.medusa/server/src/modules/paypal/payment-provider/card-service.js.map +1 -1
- package/.medusa/server/src/modules/paypal/payment-provider/index.d.ts +6 -1
- package/.medusa/server/src/modules/paypal/payment-provider/index.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/payment-provider/index.js +6 -4
- package/.medusa/server/src/modules/paypal/payment-provider/index.js.map +1 -1
- package/.medusa/server/src/modules/paypal/payment-provider/service.d.ts +8 -0
- package/.medusa/server/src/modules/paypal/payment-provider/service.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/payment-provider/service.js +39 -12
- package/.medusa/server/src/modules/paypal/payment-provider/service.js.map +1 -1
- package/.medusa/server/src/modules/paypal/service.d.ts +72 -2
- package/.medusa/server/src/modules/paypal/service.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/service.js +159 -33
- package/.medusa/server/src/modules/paypal/service.js.map +1 -1
- package/.medusa/server/src/modules/paypal/types/config.d.ts +2 -0
- package/.medusa/server/src/modules/paypal/types/config.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/types/config.js +5 -2
- package/.medusa/server/src/modules/paypal/types/config.js.map +1 -1
- package/.medusa/server/src/modules/paypal/utils/amounts.d.ts +1 -0
- package/.medusa/server/src/modules/paypal/utils/amounts.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/utils/amounts.js +15 -5
- package/.medusa/server/src/modules/paypal/utils/amounts.js.map +1 -1
- package/.medusa/server/src/modules/paypal/utils/credential-resolver.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/utils/credential-resolver.js +3 -1
- package/.medusa/server/src/modules/paypal/utils/credential-resolver.js.map +1 -1
- package/.medusa/server/src/modules/paypal/utils/currencies.d.ts +9 -0
- package/.medusa/server/src/modules/paypal/utils/currencies.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/utils/currencies.js +13 -0
- package/.medusa/server/src/modules/paypal/utils/currencies.js.map +1 -1
- package/.medusa/server/src/modules/paypal/utils/payment-session.d.ts +12 -0
- package/.medusa/server/src/modules/paypal/utils/payment-session.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/utils/payment-session.js +4 -3
- package/.medusa/server/src/modules/paypal/utils/payment-session.js.map +1 -1
- package/.medusa/server/src/modules/paypal/utils/paypal-auth.d.ts +1 -0
- package/.medusa/server/src/modules/paypal/utils/paypal-auth.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/utils/paypal-auth.js +1 -0
- package/.medusa/server/src/modules/paypal/utils/paypal-auth.js.map +1 -1
- package/.medusa/server/src/modules/paypal/utils/paypal-fetch.d.ts +11 -0
- package/.medusa/server/src/modules/paypal/utils/paypal-fetch.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/utils/paypal-fetch.js +17 -1
- package/.medusa/server/src/modules/paypal/utils/paypal-fetch.js.map +1 -1
- package/.medusa/server/src/modules/paypal/utils/provider-ids.d.ts +6 -0
- package/.medusa/server/src/modules/paypal/utils/provider-ids.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/utils/provider-ids.js +6 -0
- package/.medusa/server/src/modules/paypal/utils/provider-ids.js.map +1 -1
- package/.medusa/server/src/modules/paypal/utils/secret-crypto.d.ts +2 -0
- package/.medusa/server/src/modules/paypal/utils/secret-crypto.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/utils/secret-crypto.js +6 -1
- package/.medusa/server/src/modules/paypal/utils/secret-crypto.js.map +1 -1
- package/.medusa/server/src/modules/paypal/webhook-processor.d.ts +43 -0
- package/.medusa/server/src/modules/paypal/webhook-processor.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/webhook-processor.js +57 -5
- package/.medusa/server/src/modules/paypal/webhook-processor.js.map +1 -1
- package/.medusa/server/src/providers/paypal/index.d.ts +1 -0
- package/.medusa/server/src/providers/paypal/index.d.ts.map +1 -1
- package/.medusa/server/src/providers/paypal/index.js +1 -0
- package/.medusa/server/src/providers/paypal/index.js.map +1 -1
- package/.medusa/server/src/providers/paypal_card/index.d.ts +1 -0
- package/.medusa/server/src/providers/paypal_card/index.d.ts.map +1 -1
- package/.medusa/server/src/providers/paypal_card/index.js +1 -0
- package/.medusa/server/src/providers/paypal_card/index.js.map +1 -1
- package/.medusa/server/src/subscribers/paypal-order-invoice.d.ts +6 -0
- package/.medusa/server/src/subscribers/paypal-order-invoice.d.ts.map +1 -1
- package/.medusa/server/src/subscribers/paypal-order-invoice.js +9 -1
- package/.medusa/server/src/subscribers/paypal-order-invoice.js.map +1 -1
- package/.medusa/server/src/subscribers/paypal-webhook-process.d.ts +1 -0
- package/.medusa/server/src/subscribers/paypal-webhook-process.d.ts.map +1 -1
- package/.medusa/server/src/subscribers/paypal-webhook-process.js +17 -4
- package/.medusa/server/src/subscribers/paypal-webhook-process.js.map +1 -1
- package/CHANGELOG.md +19 -0
- package/README.md +184 -175
- package/package.json +24 -5
- package/src/admin/index.ts +1 -1
- package/src/admin/routes/settings/paypal/_components/FieldRow.tsx +38 -29
- package/src/admin/routes/settings/paypal/_components/SectionCard.tsx +29 -26
- package/src/admin/routes/settings/paypal/_components/Tabs.tsx +49 -48
- package/src/admin/routes/settings/paypal/_components/Toast.tsx +63 -52
- package/src/admin/routes/settings/paypal/_utils/adminFetch.ts +52 -32
- package/src/admin/routes/settings/paypal/additional-settings/page.tsx +246 -139
- package/src/admin/routes/settings/paypal/advanced-card-payments/page.tsx +208 -123
- package/src/admin/routes/settings/paypal/apple-pay/page.tsx +9 -5
- package/src/admin/routes/settings/paypal/connection/page.tsx +974 -908
- package/src/admin/routes/settings/paypal/google-pay/page.tsx +9 -5
- package/src/admin/routes/settings/paypal/page.tsx +14 -13
- package/src/admin/routes/settings/paypal/pay-later-messaging/page.tsx +9 -5
- package/src/admin/routes/settings/paypal/paypal-settings/page.tsx +304 -273
- package/src/api/admin/payment-collections/[id]/payment-sessions/route.ts +48 -39
- package/src/api/admin/paypal/disconnect/route.ts +15 -14
- package/src/api/admin/paypal/environment/route.ts +34 -32
- package/src/api/admin/paypal/onboard-complete/route.ts +61 -50
- package/src/api/admin/paypal/onboarding-link/route.ts +91 -76
- package/src/api/admin/paypal/onboarding-status/route.ts +21 -20
- package/src/api/admin/paypal/save-credentials/route.ts +48 -37
- package/src/api/admin/paypal/settings/route.ts +63 -45
- package/src/api/admin/paypal/status/route.ts +29 -17
- package/src/api/hooks/paypal/onboard-return/route.ts +15 -15
- package/src/api/hooks/paypal/webhook/route.ts +17 -17
- package/src/api/middlewares.ts +61 -61
- package/src/api/store/payment-collections/[id]/payment-sessions/route.ts +63 -54
- package/src/api/store/paypal/capture-order/route.ts +416 -370
- package/src/api/store/paypal/config/route.ts +121 -115
- package/src/api/store/paypal/create-order/route.ts +586 -539
- package/src/api/store/paypal/onboard-return/route.ts +116 -113
- package/src/api/store/paypal/settings/route.ts +29 -19
- package/src/api/store/paypal/webhook/route.ts +380 -314
- package/src/api/store/paypal-complete/route.ts +157 -128
- package/src/api/utils/rate-limit.ts +143 -129
- package/src/index.ts +1 -1
- package/src/jobs/paypal-webhook-retry.ts +257 -241
- package/src/modules/paypal/index.ts +9 -8
- package/src/modules/paypal/migrations/20260115120000_create_paypal_connection.ts +33 -33
- package/src/modules/paypal/migrations/20260123090000_create_paypal_settings.ts +22 -22
- package/src/modules/paypal/migrations/20260201090000_create_paypal_webhook_event.ts +29 -29
- package/src/modules/paypal/migrations/20260401090000_create_paypal_metric.ts +27 -27
- package/src/modules/paypal/migrations/20260701090000_add_paypal_webhook_event_processing.ts +31 -31
- package/src/modules/paypal/migrations/20261101090000_remove_paypal_reconciliation_status.ts +25 -25
- package/src/modules/paypal/migrations/20261201090000_remove_paypal_audit_log.ts +26 -26
- package/src/modules/paypal/migrations/20270101090000_set_paypal_environment_default_live.ts +15 -11
- package/src/modules/paypal/migrations/20270102090000_add_paypal_seller_email.ts +15 -11
- package/src/modules/paypal/migrations/20270103090000_add_paypal_seller_merchant_id.ts +15 -11
- package/src/modules/paypal/migrations/20270201000000_add_webhook_dead_letter.ts +17 -17
- package/src/modules/paypal/migrations/20270202000000_align_nullable_defaults.ts +44 -44
- package/src/modules/paypal/migrations/20270301000000_add_webhook_transmission_id_index.ts +15 -15
- package/src/modules/paypal/models/paypal_connection.ts +28 -23
- package/src/modules/paypal/models/paypal_metric.ts +13 -9
- package/src/modules/paypal/models/paypal_settings.ts +13 -8
- package/src/modules/paypal/models/paypal_webhook_event.ts +26 -19
- package/src/modules/paypal/payment-provider/base-provider.ts +287 -275
- package/src/modules/paypal/payment-provider/card-service.ts +927 -855
- package/src/modules/paypal/payment-provider/index.ts +14 -15
- package/src/modules/paypal/payment-provider/service.ts +906 -836
- package/src/modules/paypal/payment-provider/status-utils.ts +59 -59
- package/src/modules/paypal/payment-provider/webhook-utils.ts +109 -109
- package/src/modules/paypal/service.ts +362 -115
- package/src/modules/paypal/types/config.ts +70 -65
- package/src/modules/paypal/utils/amounts.ts +123 -107
- package/src/modules/paypal/utils/core-workflow.ts +46 -46
- package/src/modules/paypal/utils/credential-resolver.ts +275 -271
- package/src/modules/paypal/utils/currencies.ts +97 -84
- package/src/modules/paypal/utils/partner.ts +8 -8
- package/src/modules/paypal/utils/payment-session.ts +144 -138
- package/src/modules/paypal/utils/paypal-auth.ts +6 -5
- package/src/modules/paypal/utils/paypal-fetch.ts +197 -181
- package/src/modules/paypal/utils/provider-ids.ts +21 -15
- package/src/modules/paypal/utils/secret-crypto.ts +226 -197
- package/src/modules/paypal/utils/webhook-verify.ts +61 -61
- package/src/modules/paypal/webhook-processor.ts +641 -573
- package/src/providers/paypal/index.ts +9 -8
- package/src/providers/paypal_card/index.ts +9 -8
- package/src/subscribers/paypal-order-invoice.ts +180 -173
- package/src/subscribers/paypal-webhook-process.ts +147 -131
- package/tsconfig.json +21 -31
|
@@ -59,7 +59,14 @@ function FieldRow({
|
|
|
59
59
|
}) {
|
|
60
60
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-12 items-start gap-4 py-3", children: [
|
|
61
61
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 md:col-span-4", children: [
|
|
62
|
-
htmlFor ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
62
|
+
htmlFor ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
63
|
+
"label",
|
|
64
|
+
{
|
|
65
|
+
htmlFor,
|
|
66
|
+
className: "text-sm font-medium text-ui-fg-base",
|
|
67
|
+
children: label
|
|
68
|
+
}
|
|
69
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-medium text-ui-fg-base", children: label }),
|
|
63
70
|
hint ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 text-xs text-ui-fg-subtle", children: hint }) : null
|
|
64
71
|
] }),
|
|
65
72
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12 md:col-span-8", children })
|
|
@@ -84,7 +91,15 @@ function Toast({ toast, onClose }) {
|
|
|
84
91
|
role: isSuccess ? "status" : "alert",
|
|
85
92
|
"aria-live": isSuccess ? "polite" : "assertive",
|
|
86
93
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
87
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
94
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
95
|
+
"div",
|
|
96
|
+
{
|
|
97
|
+
className: [
|
|
98
|
+
"mt-0.5 h-2.5 w-2.5 rounded-full",
|
|
99
|
+
isSuccess ? "bg-emerald-500" : "bg-rose-500"
|
|
100
|
+
].join(" ")
|
|
101
|
+
}
|
|
102
|
+
),
|
|
88
103
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 text-sm text-ui-fg-base", children: toast.message }),
|
|
89
104
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
90
105
|
"button",
|
|
@@ -122,8 +137,14 @@ async function adminFetch(path, opts = {}) {
|
|
|
122
137
|
});
|
|
123
138
|
const text = await res.text().catch(() => "");
|
|
124
139
|
if (!res.ok) {
|
|
125
|
-
if (res.status === 401)
|
|
126
|
-
|
|
140
|
+
if (res.status === 401)
|
|
141
|
+
throw new Error(
|
|
142
|
+
"Unauthorized (401) - session may have expired. Please reload and log in again."
|
|
143
|
+
);
|
|
144
|
+
if (res.status === 403)
|
|
145
|
+
throw new Error(
|
|
146
|
+
"Forbidden (403) - you do not have permission to perform this action."
|
|
147
|
+
);
|
|
127
148
|
throw new Error(text || `Request failed with status ${res.status}`);
|
|
128
149
|
}
|
|
129
150
|
if (!text) return {};
|
|
@@ -144,11 +165,18 @@ const DEFAULT_FORM$1 = {
|
|
|
144
165
|
};
|
|
145
166
|
function mergeWithDefaults$1(saved) {
|
|
146
167
|
if (!saved) return { ...DEFAULT_FORM$1 };
|
|
147
|
-
const entries = Object.entries(saved).filter(
|
|
148
|
-
|
|
168
|
+
const entries = Object.entries(saved).filter(
|
|
169
|
+
([, value]) => value !== void 0
|
|
170
|
+
);
|
|
171
|
+
return {
|
|
172
|
+
...DEFAULT_FORM$1,
|
|
173
|
+
...Object.fromEntries(entries)
|
|
174
|
+
};
|
|
149
175
|
}
|
|
150
176
|
function AdditionalSettingsTab() {
|
|
151
|
-
const [form, setForm] = react.useState(() => ({
|
|
177
|
+
const [form, setForm] = react.useState(() => ({
|
|
178
|
+
...DEFAULT_FORM$1
|
|
179
|
+
}));
|
|
152
180
|
const [loading, setLoading] = react.useState(false);
|
|
153
181
|
const [saving, setSaving] = react.useState(false);
|
|
154
182
|
const [toast, setToast] = react.useState(null);
|
|
@@ -163,7 +191,8 @@ function AdditionalSettingsTab() {
|
|
|
163
191
|
const json = await adminFetch("/admin/paypal/settings");
|
|
164
192
|
const payload = (json == null ? void 0 : json.data) ?? json;
|
|
165
193
|
const saved = payload == null ? void 0 : payload.additional_settings;
|
|
166
|
-
if (saved && typeof saved === "object")
|
|
194
|
+
if (saved && typeof saved === "object")
|
|
195
|
+
setForm(mergeWithDefaults$1(saved));
|
|
167
196
|
} catch {
|
|
168
197
|
} finally {
|
|
169
198
|
setLoading(false);
|
|
@@ -174,13 +203,21 @@ function AdditionalSettingsTab() {
|
|
|
174
203
|
try {
|
|
175
204
|
setSaving(true);
|
|
176
205
|
setToast(null);
|
|
177
|
-
const json = await adminFetch("/admin/paypal/settings", {
|
|
206
|
+
const json = await adminFetch("/admin/paypal/settings", {
|
|
207
|
+
method: "POST",
|
|
208
|
+
body: {
|
|
209
|
+
additional_settings: form
|
|
210
|
+
}
|
|
211
|
+
});
|
|
178
212
|
const payload = (json == null ? void 0 : json.data) ?? json;
|
|
179
213
|
const saved = payload == null ? void 0 : payload.additional_settings;
|
|
180
214
|
if (saved && typeof saved === "object") setForm(mergeWithDefaults$1(saved));
|
|
181
215
|
setToast({ kind: "success", message: "Settings saved" });
|
|
182
216
|
} catch (e) {
|
|
183
|
-
setToast({
|
|
217
|
+
setToast({
|
|
218
|
+
kind: "error",
|
|
219
|
+
message: e instanceof Error ? e.message : "Failed to save settings"
|
|
220
|
+
});
|
|
184
221
|
} finally {
|
|
185
222
|
setSaving(false);
|
|
186
223
|
}
|
|
@@ -195,35 +232,137 @@ function AdditionalSettingsTab() {
|
|
|
195
232
|
title: "Additional Settings",
|
|
196
233
|
description: "These settings control checkout behavior and PayPal experience.",
|
|
197
234
|
right: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
198
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
235
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
236
|
+
"button",
|
|
237
|
+
{
|
|
238
|
+
type: "button",
|
|
239
|
+
onClick: onSave,
|
|
240
|
+
disabled: saving || loading,
|
|
241
|
+
className: "transition-fg relative inline-flex w-fit items-center justify-center overflow-hidden rounded-md outline-none shadow-buttons-neutral text-ui-fg-base bg-ui-button-neutral after:transition-fg after:absolute after:inset-0 after:content-[''] after:button-neutral-gradient hover:bg-ui-button-neutral-hover hover:after:button-neutral-hover-gradient active:bg-ui-button-neutral-pressed active:after:button-neutral-pressed-gradient focus-visible:shadow-buttons-neutral-focus disabled:bg-ui-bg-disabled disabled:border-ui-border-base disabled:text-ui-fg-disabled disabled:shadow-buttons-neutral disabled:after:hidden txt-compact-small-plus px-3 py-1.5",
|
|
242
|
+
children: saving ? "Saving..." : "Save settings"
|
|
243
|
+
}
|
|
244
|
+
),
|
|
199
245
|
loading ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-ui-fg-subtle", children: "Loading…" }) : null
|
|
200
246
|
] }),
|
|
201
247
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "divide-y divide-ui-border-base", children: [
|
|
202
|
-
/* @__PURE__ */ jsxRuntime.jsx(FieldRow, { label: "Payment action", htmlFor: "as-payment-action", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
248
|
+
/* @__PURE__ */ jsxRuntime.jsx(FieldRow, { label: "Payment action", htmlFor: "as-payment-action", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
249
|
+
"select",
|
|
250
|
+
{
|
|
251
|
+
id: "as-payment-action",
|
|
252
|
+
value: form.paymentAction,
|
|
253
|
+
onChange: (e) => setForm((p) => ({
|
|
254
|
+
...p,
|
|
255
|
+
paymentAction: e.target.value
|
|
256
|
+
})),
|
|
257
|
+
className: "w-full rounded-md border border-ui-border-base bg-ui-bg-base px-3 py-2 text-sm text-ui-fg-base outline-none focus:ring-2 focus:ring-ui-border-interactive",
|
|
258
|
+
children: [
|
|
259
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "capture", children: "Capture" }),
|
|
260
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "authorize", children: "Authorize" })
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
) }),
|
|
264
|
+
/* @__PURE__ */ jsxRuntime.jsx(FieldRow, { label: "Brand Name", htmlFor: "as-brand-name", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
265
|
+
"input",
|
|
266
|
+
{
|
|
267
|
+
id: "as-brand-name",
|
|
268
|
+
value: form.brandName,
|
|
269
|
+
onChange: (e) => setForm((p) => ({ ...p, brandName: e.target.value })),
|
|
270
|
+
className: "w-full rounded-md border border-ui-border-base bg-ui-bg-base px-3 py-2 text-sm text-ui-fg-base outline-none focus:ring-2 focus:ring-ui-border-interactive",
|
|
271
|
+
placeholder: "PayPal"
|
|
272
|
+
}
|
|
273
|
+
) }),
|
|
274
|
+
/* @__PURE__ */ jsxRuntime.jsx(FieldRow, { label: "Landing Page", htmlFor: "as-landing-page", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
275
|
+
"select",
|
|
276
|
+
{
|
|
277
|
+
id: "as-landing-page",
|
|
278
|
+
value: form.landingPage,
|
|
279
|
+
onChange: (e) => setForm((p) => ({
|
|
280
|
+
...p,
|
|
281
|
+
landingPage: e.target.value
|
|
282
|
+
})),
|
|
283
|
+
className: "w-full rounded-md border border-ui-border-base bg-ui-bg-base px-3 py-2 text-sm text-ui-fg-base outline-none focus:ring-2 focus:ring-ui-border-interactive",
|
|
284
|
+
children: [
|
|
285
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "no_preference", children: "No Preference" }),
|
|
286
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "login", children: "Login" }),
|
|
287
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "billing", children: "Billing" })
|
|
288
|
+
]
|
|
289
|
+
}
|
|
290
|
+
) }),
|
|
212
291
|
/* @__PURE__ */ jsxRuntime.jsx(FieldRow, { label: "Instant Payments", children: /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "inline-flex items-center gap-2", children: [
|
|
213
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
292
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
293
|
+
"input",
|
|
294
|
+
{
|
|
295
|
+
type: "checkbox",
|
|
296
|
+
checked: form.requireInstantPayment,
|
|
297
|
+
onChange: (e) => setForm((p) => ({
|
|
298
|
+
...p,
|
|
299
|
+
requireInstantPayment: e.target.checked
|
|
300
|
+
})),
|
|
301
|
+
className: "h-4 w-4 rounded border-ui-border-base"
|
|
302
|
+
}
|
|
303
|
+
),
|
|
214
304
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-ui-fg-base", children: "Require Instant Payment" })
|
|
215
305
|
] }) }),
|
|
216
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
306
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
307
|
+
FieldRow,
|
|
308
|
+
{
|
|
309
|
+
label: "Send Item Details",
|
|
310
|
+
hint: "Include all line item details in the payment request to PayPal so that they can be seen from the PayPal transaction details page.",
|
|
311
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "inline-flex items-center gap-2", children: [
|
|
312
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
313
|
+
"input",
|
|
314
|
+
{
|
|
315
|
+
type: "checkbox",
|
|
316
|
+
checked: form.sendItemDetails,
|
|
317
|
+
onChange: (e) => setForm((p) => ({
|
|
318
|
+
...p,
|
|
319
|
+
sendItemDetails: e.target.checked
|
|
320
|
+
})),
|
|
321
|
+
className: "h-4 w-4 rounded border-ui-border-base"
|
|
322
|
+
}
|
|
323
|
+
),
|
|
324
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-ui-fg-base", children: "Send line item details to PayPal" })
|
|
325
|
+
] })
|
|
326
|
+
}
|
|
327
|
+
),
|
|
328
|
+
/* @__PURE__ */ jsxRuntime.jsx(FieldRow, { label: "Invoice prefix", htmlFor: "as-invoice-prefix", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
329
|
+
"input",
|
|
330
|
+
{
|
|
331
|
+
id: "as-invoice-prefix",
|
|
332
|
+
value: form.invoicePrefix,
|
|
333
|
+
onChange: (e) => setForm((p) => ({ ...p, invoicePrefix: e.target.value })),
|
|
334
|
+
className: "w-full rounded-md border border-ui-border-base bg-ui-bg-base px-3 py-2 text-sm text-ui-fg-base outline-none focus:ring-2 focus:ring-ui-border-interactive",
|
|
335
|
+
placeholder: "PP-"
|
|
336
|
+
}
|
|
337
|
+
) }),
|
|
338
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
339
|
+
FieldRow,
|
|
340
|
+
{
|
|
341
|
+
label: "Credit Card Statement Name",
|
|
342
|
+
htmlFor: "as-cc-statement",
|
|
343
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
344
|
+
"input",
|
|
345
|
+
{
|
|
346
|
+
id: "as-cc-statement",
|
|
347
|
+
value: form.creditCardStatementName,
|
|
348
|
+
onChange: (e) => setForm((p) => ({
|
|
349
|
+
...p,
|
|
350
|
+
creditCardStatementName: e.target.value
|
|
351
|
+
})),
|
|
352
|
+
className: "w-full rounded-md border border-ui-border-base bg-ui-bg-base px-3 py-2 text-sm text-ui-fg-base outline-none focus:ring-2 focus:ring-ui-border-interactive",
|
|
353
|
+
placeholder: "PayPal"
|
|
354
|
+
}
|
|
355
|
+
)
|
|
356
|
+
}
|
|
357
|
+
)
|
|
222
358
|
] })
|
|
223
359
|
}
|
|
224
360
|
)
|
|
225
361
|
] }) });
|
|
226
362
|
}
|
|
363
|
+
function PayPalApplePayPage() {
|
|
364
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Navigate, { to: "/settings/paypal/connection", replace: true });
|
|
365
|
+
}
|
|
227
366
|
const DEFAULT_FORM = {
|
|
228
367
|
enabled: true,
|
|
229
368
|
title: "Credit or Debit Card",
|
|
@@ -231,17 +370,36 @@ const DEFAULT_FORM = {
|
|
|
231
370
|
};
|
|
232
371
|
function mergeWithDefaults(saved) {
|
|
233
372
|
if (!saved) return { ...DEFAULT_FORM };
|
|
234
|
-
const entries = Object.entries(saved).filter(
|
|
235
|
-
|
|
373
|
+
const entries = Object.entries(saved).filter(
|
|
374
|
+
([, value]) => value !== void 0
|
|
375
|
+
);
|
|
376
|
+
return {
|
|
377
|
+
...DEFAULT_FORM,
|
|
378
|
+
...Object.fromEntries(entries)
|
|
379
|
+
};
|
|
236
380
|
}
|
|
237
381
|
const THREE_DS_OPTIONS = [
|
|
238
|
-
{
|
|
239
|
-
|
|
240
|
-
|
|
382
|
+
{
|
|
383
|
+
value: "when_required",
|
|
384
|
+
label: "3D Secure when required",
|
|
385
|
+
hint: "Triggers 3DS only when the card / issuer requires it."
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
value: "sli",
|
|
389
|
+
label: "3D Secure (SCA) / liability shift (recommended)",
|
|
390
|
+
hint: "Attempts to optimize for liability shift while remaining compliant."
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
value: "always",
|
|
394
|
+
label: "Always request 3D Secure",
|
|
395
|
+
hint: "Forces 3DS challenge whenever possible (may reduce conversion)."
|
|
396
|
+
}
|
|
241
397
|
];
|
|
242
398
|
function AdvancedCardPaymentsTab() {
|
|
243
399
|
var _a, _b;
|
|
244
|
-
const [form, setForm] = react.useState(() => ({
|
|
400
|
+
const [form, setForm] = react.useState(() => ({
|
|
401
|
+
...DEFAULT_FORM
|
|
402
|
+
}));
|
|
245
403
|
const [loading, setLoading] = react.useState(false);
|
|
246
404
|
const [saving, setSaving] = react.useState(false);
|
|
247
405
|
const [toast, setToast] = react.useState(null);
|
|
@@ -256,7 +414,8 @@ function AdvancedCardPaymentsTab() {
|
|
|
256
414
|
const json = await adminFetch("/admin/paypal/settings");
|
|
257
415
|
const payload = (json == null ? void 0 : json.data) ?? json;
|
|
258
416
|
const saved = payload == null ? void 0 : payload.advanced_card_payments;
|
|
259
|
-
if (saved && typeof saved === "object")
|
|
417
|
+
if (saved && typeof saved === "object")
|
|
418
|
+
setForm(mergeWithDefaults(saved));
|
|
260
419
|
} catch {
|
|
261
420
|
} finally {
|
|
262
421
|
setLoading(false);
|
|
@@ -268,14 +427,19 @@ function AdvancedCardPaymentsTab() {
|
|
|
268
427
|
setSaving(true);
|
|
269
428
|
const json = await adminFetch("/admin/paypal/settings", {
|
|
270
429
|
method: "POST",
|
|
271
|
-
body: {
|
|
430
|
+
body: {
|
|
431
|
+
advanced_card_payments: form
|
|
432
|
+
}
|
|
272
433
|
});
|
|
273
434
|
const payload = (json == null ? void 0 : json.data) ?? json;
|
|
274
435
|
const saved = payload == null ? void 0 : payload.advanced_card_payments;
|
|
275
436
|
if (saved && typeof saved === "object") setForm(mergeWithDefaults(saved));
|
|
276
437
|
setToast({ kind: "success", message: "Settings saved" });
|
|
277
438
|
} catch (e) {
|
|
278
|
-
setToast({
|
|
439
|
+
setToast({
|
|
440
|
+
kind: "error",
|
|
441
|
+
message: (e instanceof Error ? e.message : "") || "Failed to save settings."
|
|
442
|
+
});
|
|
279
443
|
} finally {
|
|
280
444
|
setSaving(false);
|
|
281
445
|
}
|
|
@@ -290,25 +454,71 @@ function AdvancedCardPaymentsTab() {
|
|
|
290
454
|
title: "Advanced Card Payments",
|
|
291
455
|
description: "Control card checkout settings and 3D Secure behavior.",
|
|
292
456
|
right: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
293
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
457
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
458
|
+
"button",
|
|
459
|
+
{
|
|
460
|
+
type: "button",
|
|
461
|
+
onClick: onSave,
|
|
462
|
+
disabled: saving || loading,
|
|
463
|
+
className: "transition-fg relative inline-flex w-fit items-center justify-center overflow-hidden rounded-md outline-none shadow-buttons-neutral text-ui-fg-base bg-ui-button-neutral after:transition-fg after:absolute after:inset-0 after:content-[''] after:button-neutral-gradient hover:bg-ui-button-neutral-hover hover:after:button-neutral-hover-gradient active:bg-ui-button-neutral-pressed active:after:button-neutral-pressed-gradient focus-visible:shadow-buttons-neutral-focus disabled:bg-ui-bg-disabled disabled:border-ui-border-base disabled:text-ui-fg-disabled disabled:shadow-buttons-neutral disabled:after:hidden txt-compact-small-plus px-3 py-1.5",
|
|
464
|
+
children: saving ? "Saving..." : "Save settings"
|
|
465
|
+
}
|
|
466
|
+
),
|
|
294
467
|
loading ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-ui-fg-subtle", children: "Loading…" }) : null
|
|
295
468
|
] }),
|
|
296
469
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "divide-y divide-ui-border-base", children: [
|
|
297
470
|
/* @__PURE__ */ jsxRuntime.jsx(FieldRow, { label: "Enable/Disable", children: /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "inline-flex items-center gap-2", children: [
|
|
298
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
471
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
472
|
+
"input",
|
|
473
|
+
{
|
|
474
|
+
type: "checkbox",
|
|
475
|
+
checked: form.enabled,
|
|
476
|
+
onChange: (e) => setForm((p) => ({ ...p, enabled: e.target.checked })),
|
|
477
|
+
className: "h-4 w-4 rounded border-ui-border-base"
|
|
478
|
+
}
|
|
479
|
+
),
|
|
299
480
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-ui-fg-base", children: "Enable Advanced Credit/Debit Card" })
|
|
300
481
|
] }) }),
|
|
301
|
-
/* @__PURE__ */ jsxRuntime.jsx(FieldRow, { label: "Title", htmlFor: "acp-title", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
482
|
+
/* @__PURE__ */ jsxRuntime.jsx(FieldRow, { label: "Title", htmlFor: "acp-title", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
483
|
+
"input",
|
|
484
|
+
{
|
|
485
|
+
id: "acp-title",
|
|
486
|
+
value: form.title,
|
|
487
|
+
onChange: (e) => setForm((p) => ({ ...p, title: e.target.value })),
|
|
488
|
+
className: "w-full rounded-md border border-ui-border-base bg-ui-bg-base px-3 py-2 text-sm text-ui-fg-base outline-none focus:ring-2 focus:ring-ui-border-interactive",
|
|
489
|
+
placeholder: "Credit or Debit Card"
|
|
490
|
+
}
|
|
491
|
+
) }),
|
|
492
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
493
|
+
FieldRow,
|
|
494
|
+
{
|
|
495
|
+
label: "Contingency for 3D Secure",
|
|
496
|
+
hint: "Choose when 3D Secure should be triggered during card payments.",
|
|
497
|
+
htmlFor: "acp-threeds",
|
|
498
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
499
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
500
|
+
"select",
|
|
501
|
+
{
|
|
502
|
+
id: "acp-threeds",
|
|
503
|
+
value: form.threeDS,
|
|
504
|
+
onChange: (e) => setForm((p) => ({
|
|
505
|
+
...p,
|
|
506
|
+
threeDS: e.target.value
|
|
507
|
+
})),
|
|
508
|
+
className: "w-full rounded-md border border-ui-border-base bg-ui-bg-base px-3 py-2 text-sm text-ui-fg-base outline-none focus:ring-2 focus:ring-ui-border-interactive",
|
|
509
|
+
children: THREE_DS_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: o.label }, o.value))
|
|
510
|
+
}
|
|
511
|
+
),
|
|
512
|
+
((_a = THREE_DS_OPTIONS.find((o) => o.value === form.threeDS)) == null ? void 0 : _a.hint) ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-ui-fg-subtle", children: (_b = THREE_DS_OPTIONS.find((o) => o.value === form.threeDS)) == null ? void 0 : _b.hint }) : null
|
|
513
|
+
] })
|
|
514
|
+
}
|
|
515
|
+
)
|
|
306
516
|
] })
|
|
307
517
|
}
|
|
308
518
|
)
|
|
309
519
|
] }) });
|
|
310
520
|
}
|
|
311
|
-
function
|
|
521
|
+
function PayPalGooglePayPage() {
|
|
312
522
|
return /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Navigate, { to: "/settings/paypal/connection", replace: true });
|
|
313
523
|
}
|
|
314
524
|
const config = adminSdk.defineRouteConfig({
|
|
@@ -339,7 +549,10 @@ function readCachedUrl(env) {
|
|
|
339
549
|
}
|
|
340
550
|
function writeCachedUrl(env, url) {
|
|
341
551
|
try {
|
|
342
|
-
localStorage.setItem(
|
|
552
|
+
localStorage.setItem(
|
|
553
|
+
cacheKeyFor(env),
|
|
554
|
+
JSON.stringify({ url, ts: Date.now() })
|
|
555
|
+
);
|
|
343
556
|
} catch {
|
|
344
557
|
}
|
|
345
558
|
}
|
|
@@ -524,7 +737,8 @@ function PayPalConnectionPage() {
|
|
|
524
737
|
ppScript.async = true;
|
|
525
738
|
document.head.appendChild(ppScript);
|
|
526
739
|
return () => {
|
|
527
|
-
if (preloadLink == null ? void 0 : preloadLink.parentNode)
|
|
740
|
+
if (preloadLink == null ? void 0 : preloadLink.parentNode)
|
|
741
|
+
preloadLink.parentNode.removeChild(preloadLink);
|
|
528
742
|
if (ppScript.parentNode) ppScript.parentNode.removeChild(ppScript);
|
|
529
743
|
};
|
|
530
744
|
}, []);
|
|
@@ -561,7 +775,8 @@ function PayPalConnectionPage() {
|
|
|
561
775
|
async (targetEnv, runId) => {
|
|
562
776
|
if (initLoaderRef.current) {
|
|
563
777
|
const loaderText = initLoaderRef.current.querySelector("#loader-text");
|
|
564
|
-
if (loaderText)
|
|
778
|
+
if (loaderText)
|
|
779
|
+
loaderText.textContent = "Generating onboarding session...";
|
|
565
780
|
}
|
|
566
781
|
try {
|
|
567
782
|
const res = await fetch(SERVICE_URL, {
|
|
@@ -851,61 +1066,73 @@ function PayPalConnectionPage() {
|
|
|
851
1066
|
]
|
|
852
1067
|
}
|
|
853
1068
|
),
|
|
854
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
855
|
-
|
|
856
|
-
"a",
|
|
857
|
-
{
|
|
858
|
-
ref: (node) => {
|
|
859
|
-
paypalButtonRef.current = node;
|
|
860
|
-
ppBtnMeasureRef.current = node;
|
|
861
|
-
},
|
|
862
|
-
id: "paypal-button",
|
|
863
|
-
"data-paypal-button": "true",
|
|
864
|
-
href: finalUrl || "#",
|
|
865
|
-
"data-paypal-onboard-complete": "onboardingCallback",
|
|
866
|
-
onClick: handleConnectClick,
|
|
867
|
-
className: "transition-fg relative inline-flex w-fit items-center justify-center overflow-hidden rounded-md outline-none no-underline shadow-buttons-neutral text-ui-fg-base bg-ui-button-neutral after:transition-fg after:absolute after:inset-0 after:content-[''] after:button-neutral-gradient hover:bg-ui-button-neutral-hover hover:after:button-neutral-hover-gradient active:bg-ui-button-neutral-pressed active:after:button-neutral-pressed-gradient focus-visible:shadow-buttons-neutral-focus disabled:bg-ui-bg-disabled disabled:border-ui-border-base disabled:text-ui-fg-disabled disabled:shadow-buttons-neutral disabled:after:hidden txt-compact-small-plus px-3 py-1.5",
|
|
868
|
-
style: {
|
|
869
|
-
cursor: onboardingInProgress ? "not-allowed" : "pointer",
|
|
870
|
-
opacity: onboardingInProgress ? 0.6 : 1,
|
|
871
|
-
pointerEvents: onboardingInProgress ? "none" : "auto"
|
|
872
|
-
},
|
|
873
|
-
children: "Connect to PayPal"
|
|
874
|
-
}
|
|
875
|
-
),
|
|
876
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
877
|
-
"div",
|
|
878
|
-
{
|
|
879
|
-
className: "mt-2",
|
|
880
|
-
style: {
|
|
881
|
-
width: ppBtnWidth ? `${ppBtnWidth}px` : "auto",
|
|
882
|
-
marginTop: "20px",
|
|
883
|
-
marginBottom: "10px"
|
|
884
|
-
},
|
|
885
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] text-ui-fg-muted leading-none", children: "OR" }) })
|
|
886
|
-
}
|
|
887
|
-
),
|
|
888
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
889
|
-
"button",
|
|
890
|
-
{
|
|
891
|
-
type: "button",
|
|
892
|
-
onClick: () => setShowManual(!showManual),
|
|
893
|
-
disabled: onboardingInProgress,
|
|
894
|
-
className: "text-sm text-ui-fg-interactive underline whitespace-nowrap disabled:opacity-50 disabled:cursor-not-allowed",
|
|
895
|
-
children: "Click here to insert credentials manually"
|
|
896
|
-
}
|
|
897
|
-
) })
|
|
898
|
-
] }),
|
|
899
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `${connState === "ready" ? "hidden" : "block"} mt-3`, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
900
|
-
"button",
|
|
1069
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1070
|
+
"div",
|
|
901
1071
|
{
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
1072
|
+
className: `${connState === "ready" ? "block" : "hidden"}`,
|
|
1073
|
+
children: [
|
|
1074
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1075
|
+
"a",
|
|
1076
|
+
{
|
|
1077
|
+
ref: (node) => {
|
|
1078
|
+
paypalButtonRef.current = node;
|
|
1079
|
+
ppBtnMeasureRef.current = node;
|
|
1080
|
+
},
|
|
1081
|
+
id: "paypal-button",
|
|
1082
|
+
"data-paypal-button": "true",
|
|
1083
|
+
href: finalUrl || "#",
|
|
1084
|
+
"data-paypal-onboard-complete": "onboardingCallback",
|
|
1085
|
+
onClick: handleConnectClick,
|
|
1086
|
+
className: "transition-fg relative inline-flex w-fit items-center justify-center overflow-hidden rounded-md outline-none no-underline shadow-buttons-neutral text-ui-fg-base bg-ui-button-neutral after:transition-fg after:absolute after:inset-0 after:content-[''] after:button-neutral-gradient hover:bg-ui-button-neutral-hover hover:after:button-neutral-hover-gradient active:bg-ui-button-neutral-pressed active:after:button-neutral-pressed-gradient focus-visible:shadow-buttons-neutral-focus disabled:bg-ui-bg-disabled disabled:border-ui-border-base disabled:text-ui-fg-disabled disabled:shadow-buttons-neutral disabled:after:hidden txt-compact-small-plus px-3 py-1.5",
|
|
1087
|
+
style: {
|
|
1088
|
+
cursor: onboardingInProgress ? "not-allowed" : "pointer",
|
|
1089
|
+
opacity: onboardingInProgress ? 0.6 : 1,
|
|
1090
|
+
pointerEvents: onboardingInProgress ? "none" : "auto"
|
|
1091
|
+
},
|
|
1092
|
+
children: "Connect to PayPal"
|
|
1093
|
+
}
|
|
1094
|
+
),
|
|
1095
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1096
|
+
"div",
|
|
1097
|
+
{
|
|
1098
|
+
className: "mt-2",
|
|
1099
|
+
style: {
|
|
1100
|
+
width: ppBtnWidth ? `${ppBtnWidth}px` : "auto",
|
|
1101
|
+
marginTop: "20px",
|
|
1102
|
+
marginBottom: "10px"
|
|
1103
|
+
},
|
|
1104
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] text-ui-fg-muted leading-none", children: "OR" }) })
|
|
1105
|
+
}
|
|
1106
|
+
),
|
|
1107
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1108
|
+
"button",
|
|
1109
|
+
{
|
|
1110
|
+
type: "button",
|
|
1111
|
+
onClick: () => setShowManual(!showManual),
|
|
1112
|
+
disabled: onboardingInProgress,
|
|
1113
|
+
className: "text-sm text-ui-fg-interactive underline whitespace-nowrap disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1114
|
+
children: "Click here to insert credentials manually"
|
|
1115
|
+
}
|
|
1116
|
+
) })
|
|
1117
|
+
]
|
|
907
1118
|
}
|
|
908
|
-
)
|
|
1119
|
+
),
|
|
1120
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1121
|
+
"div",
|
|
1122
|
+
{
|
|
1123
|
+
className: `${connState === "ready" ? "hidden" : "block"} mt-3`,
|
|
1124
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1125
|
+
"button",
|
|
1126
|
+
{
|
|
1127
|
+
type: "button",
|
|
1128
|
+
onClick: () => setShowManual(!showManual),
|
|
1129
|
+
disabled: onboardingInProgress,
|
|
1130
|
+
className: "text-sm text-ui-fg-interactive underline whitespace-nowrap disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1131
|
+
children: "Click here to insert credentials manually"
|
|
1132
|
+
}
|
|
1133
|
+
)
|
|
1134
|
+
}
|
|
1135
|
+
),
|
|
909
1136
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
910
1137
|
"div",
|
|
911
1138
|
{
|
|
@@ -918,7 +1145,14 @@ function PayPalConnectionPage() {
|
|
|
918
1145
|
] }) }),
|
|
919
1146
|
showManual && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "md:col-span-2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-[260px] max-w-xl mt-4 grid grid-cols-1 gap-3 md:grid-cols-2", children: [
|
|
920
1147
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
921
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1148
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1149
|
+
"label",
|
|
1150
|
+
{
|
|
1151
|
+
htmlFor: "pp-manual-client-id",
|
|
1152
|
+
className: "text-sm font-medium",
|
|
1153
|
+
children: "Client ID"
|
|
1154
|
+
}
|
|
1155
|
+
),
|
|
922
1156
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
923
1157
|
"input",
|
|
924
1158
|
{
|
|
@@ -933,7 +1167,14 @@ function PayPalConnectionPage() {
|
|
|
933
1167
|
)
|
|
934
1168
|
] }),
|
|
935
1169
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
936
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1170
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1171
|
+
"label",
|
|
1172
|
+
{
|
|
1173
|
+
htmlFor: "pp-manual-secret",
|
|
1174
|
+
className: "text-sm font-medium",
|
|
1175
|
+
children: "Secret"
|
|
1176
|
+
}
|
|
1177
|
+
),
|
|
937
1178
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
938
1179
|
"input",
|
|
939
1180
|
{
|
|
@@ -967,18 +1208,25 @@ function PayPalConnectionPage() {
|
|
|
967
1208
|
"and sign in or create an account."
|
|
968
1209
|
] }),
|
|
969
1210
|
/* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
970
|
-
"Select
|
|
1211
|
+
"Select",
|
|
1212
|
+
" ",
|
|
971
1213
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-ui-fg-base", children: "Apps & Credentials" }),
|
|
972
|
-
", then choose
|
|
1214
|
+
", then choose",
|
|
1215
|
+
" ",
|
|
973
1216
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-ui-fg-base", children: "Create App" }),
|
|
974
|
-
"
|
|
1217
|
+
" ",
|
|
1218
|
+
"if you need a new project."
|
|
975
1219
|
] }),
|
|
976
1220
|
/* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
977
|
-
"Copy your app's
|
|
1221
|
+
"Copy your app's",
|
|
1222
|
+
" ",
|
|
978
1223
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-ui-fg-base", children: "Client ID" }),
|
|
979
|
-
"
|
|
1224
|
+
" ",
|
|
1225
|
+
"and",
|
|
1226
|
+
" ",
|
|
980
1227
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-ui-fg-base", children: "Secret" }),
|
|
981
|
-
", paste them above, then click
|
|
1228
|
+
", paste them above, then click",
|
|
1229
|
+
" ",
|
|
982
1230
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-ui-fg-base", children: "Save credentials" }),
|
|
983
1231
|
"."
|
|
984
1232
|
] })
|
|
@@ -1028,9 +1276,6 @@ function PayPalConnectionPage() {
|
|
|
1028
1276
|
` })
|
|
1029
1277
|
] });
|
|
1030
1278
|
}
|
|
1031
|
-
function PayPalGooglePayPage() {
|
|
1032
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Navigate, { to: "/settings/paypal/connection", replace: true });
|
|
1033
|
-
}
|
|
1034
1279
|
function PayPalPayLaterMessagingPage() {
|
|
1035
1280
|
return /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Navigate, { to: "/settings/paypal/connection", replace: true });
|
|
1036
1281
|
}
|
|
@@ -1080,9 +1325,7 @@ function PayPalSettingsTab() {
|
|
|
1080
1325
|
(async () => {
|
|
1081
1326
|
try {
|
|
1082
1327
|
setLoading(true);
|
|
1083
|
-
const json = await adminFetch(
|
|
1084
|
-
"/admin/paypal/settings"
|
|
1085
|
-
);
|
|
1328
|
+
const json = await adminFetch("/admin/paypal/settings");
|
|
1086
1329
|
const payload = (json == null ? void 0 : json.data) ?? json;
|
|
1087
1330
|
const saved = payload == null ? void 0 : payload.paypal_settings;
|
|
1088
1331
|
if (saved && typeof saved === "object") {
|
|
@@ -1101,13 +1344,12 @@ function PayPalSettingsTab() {
|
|
|
1101
1344
|
try {
|
|
1102
1345
|
setSaving(true);
|
|
1103
1346
|
const cleaned = { ...form };
|
|
1104
|
-
const json = await adminFetch(
|
|
1105
|
-
"
|
|
1106
|
-
{
|
|
1107
|
-
|
|
1108
|
-
body: { paypal_settings: cleaned }
|
|
1347
|
+
const json = await adminFetch("/admin/paypal/settings", {
|
|
1348
|
+
method: "POST",
|
|
1349
|
+
body: {
|
|
1350
|
+
paypal_settings: cleaned
|
|
1109
1351
|
}
|
|
1110
|
-
);
|
|
1352
|
+
});
|
|
1111
1353
|
const payload = (json == null ? void 0 : json.data) ?? json;
|
|
1112
1354
|
const saved = payload == null ? void 0 : payload.paypal_settings;
|
|
1113
1355
|
if (saved && typeof saved === "object") {
|
|
@@ -1127,10 +1369,7 @@ function PayPalSettingsTab() {
|
|
|
1127
1369
|
}
|
|
1128
1370
|
}
|
|
1129
1371
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-6", children: [
|
|
1130
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1131
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-xl font-semibold text-ui-fg-base", children: "PayPal Gateway By Easy Payment" }) }),
|
|
1132
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2" })
|
|
1133
|
-
] }),
|
|
1372
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-start justify-between gap-4", children: /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-xl font-semibold text-ui-fg-base", children: "PayPal Gateway By Easy Payment" }) }) }),
|
|
1134
1373
|
/* @__PURE__ */ jsxRuntime.jsx(PayPalTabs, {}),
|
|
1135
1374
|
/* @__PURE__ */ jsxRuntime.jsx(Toast, { toast, onClose: dismissToast }),
|
|
1136
1375
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1188,7 +1427,10 @@ function PayPalSettingsTab() {
|
|
|
1188
1427
|
{
|
|
1189
1428
|
id: "pp-btn-color",
|
|
1190
1429
|
value: form.buttonColor,
|
|
1191
|
-
onChange: (e) => setForm((p) => ({
|
|
1430
|
+
onChange: (e) => setForm((p) => ({
|
|
1431
|
+
...p,
|
|
1432
|
+
buttonColor: e.target.value
|
|
1433
|
+
})),
|
|
1192
1434
|
className: "w-full rounded-md border border-ui-border-base bg-ui-bg-base px-3 py-2 text-sm text-ui-fg-base outline-none focus:ring-2 focus:ring-ui-border-interactive",
|
|
1193
1435
|
children: COLOR_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: o.label }, o.value))
|
|
1194
1436
|
}
|
|
@@ -1198,7 +1440,10 @@ function PayPalSettingsTab() {
|
|
|
1198
1440
|
{
|
|
1199
1441
|
id: "pp-btn-shape",
|
|
1200
1442
|
value: form.buttonShape,
|
|
1201
|
-
onChange: (e) => setForm((p) => ({
|
|
1443
|
+
onChange: (e) => setForm((p) => ({
|
|
1444
|
+
...p,
|
|
1445
|
+
buttonShape: e.target.value
|
|
1446
|
+
})),
|
|
1202
1447
|
className: "w-full rounded-md border border-ui-border-base bg-ui-bg-base px-3 py-2 text-sm text-ui-fg-base outline-none focus:ring-2 focus:ring-ui-border-interactive",
|
|
1203
1448
|
children: SHAPE_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: o.label }, o.value))
|
|
1204
1449
|
}
|
|
@@ -1208,7 +1453,10 @@ function PayPalSettingsTab() {
|
|
|
1208
1453
|
{
|
|
1209
1454
|
id: "pp-btn-width",
|
|
1210
1455
|
value: form.buttonWidth,
|
|
1211
|
-
onChange: (e) => setForm((p) => ({
|
|
1456
|
+
onChange: (e) => setForm((p) => ({
|
|
1457
|
+
...p,
|
|
1458
|
+
buttonWidth: e.target.value
|
|
1459
|
+
})),
|
|
1212
1460
|
className: "w-full rounded-md border border-ui-border-base bg-ui-bg-base px-3 py-2 text-sm text-ui-fg-base outline-none focus:ring-2 focus:ring-ui-border-interactive",
|
|
1213
1461
|
children: WIDTH_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: o.label }, o.value))
|
|
1214
1462
|
}
|
|
@@ -1218,7 +1466,10 @@ function PayPalSettingsTab() {
|
|
|
1218
1466
|
{
|
|
1219
1467
|
id: "pp-btn-height",
|
|
1220
1468
|
value: String(form.buttonHeight),
|
|
1221
|
-
onChange: (e) => setForm((p) => ({
|
|
1469
|
+
onChange: (e) => setForm((p) => ({
|
|
1470
|
+
...p,
|
|
1471
|
+
buttonHeight: Number(e.target.value)
|
|
1472
|
+
})),
|
|
1222
1473
|
className: "w-full rounded-md border border-ui-border-base bg-ui-bg-base px-3 py-2 text-sm text-ui-fg-base outline-none focus:ring-2 focus:ring-ui-border-interactive",
|
|
1223
1474
|
children: HEIGHT_OPTIONS.map((h) => /* @__PURE__ */ jsxRuntime.jsxs("option", { value: h, children: [
|
|
1224
1475
|
h,
|
|
@@ -1231,7 +1482,10 @@ function PayPalSettingsTab() {
|
|
|
1231
1482
|
{
|
|
1232
1483
|
id: "pp-btn-label",
|
|
1233
1484
|
value: form.buttonLabel,
|
|
1234
|
-
onChange: (e) => setForm((p) => ({
|
|
1485
|
+
onChange: (e) => setForm((p) => ({
|
|
1486
|
+
...p,
|
|
1487
|
+
buttonLabel: e.target.value
|
|
1488
|
+
})),
|
|
1235
1489
|
className: "w-full rounded-md border border-ui-border-base bg-ui-bg-base px-3 py-2 text-sm text-ui-fg-base outline-none focus:ring-2 focus:ring-ui-border-interactive",
|
|
1236
1490
|
children: LABEL_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: o.label }, o.value))
|
|
1237
1491
|
}
|
|
@@ -1252,22 +1506,22 @@ const routeModule = {
|
|
|
1252
1506
|
Component: AdditionalSettingsTab,
|
|
1253
1507
|
path: "/settings/paypal/additional-settings"
|
|
1254
1508
|
},
|
|
1255
|
-
{
|
|
1256
|
-
Component: AdvancedCardPaymentsTab,
|
|
1257
|
-
path: "/settings/paypal/advanced-card-payments"
|
|
1258
|
-
},
|
|
1259
1509
|
{
|
|
1260
1510
|
Component: PayPalApplePayPage,
|
|
1261
1511
|
path: "/settings/paypal/apple-pay"
|
|
1262
1512
|
},
|
|
1263
1513
|
{
|
|
1264
|
-
Component:
|
|
1265
|
-
path: "/settings/paypal/
|
|
1514
|
+
Component: AdvancedCardPaymentsTab,
|
|
1515
|
+
path: "/settings/paypal/advanced-card-payments"
|
|
1266
1516
|
},
|
|
1267
1517
|
{
|
|
1268
1518
|
Component: PayPalGooglePayPage,
|
|
1269
1519
|
path: "/settings/paypal/google-pay"
|
|
1270
1520
|
},
|
|
1521
|
+
{
|
|
1522
|
+
Component: PayPalConnectionPage,
|
|
1523
|
+
path: "/settings/paypal/connection"
|
|
1524
|
+
},
|
|
1271
1525
|
{
|
|
1272
1526
|
Component: PayPalPayLaterMessagingPage,
|
|
1273
1527
|
path: "/settings/paypal/pay-later-messaging"
|