@easypayment/medusa-payment-paypal 1.2.3 → 1.2.5
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 +392 -138
- package/.medusa/server/src/admin/index.mjs +392 -138
- 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 +11 -1
- 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 +80 -26
- 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 +55 -8
- 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 +24 -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 +296 -0
- 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 -7
- 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 +40 -198
- 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 +9 -2
- package/.medusa/server/src/modules/paypal/payment-provider/service.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/payment-provider/service.js +29 -181
- package/.medusa/server/src/modules/paypal/payment-provider/service.js.map +1 -1
- package/.medusa/server/src/modules/paypal/payment-provider/status-utils.d.ts +21 -0
- package/.medusa/server/src/modules/paypal/payment-provider/status-utils.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/payment-provider/status-utils.js +54 -0
- package/.medusa/server/src/modules/paypal/payment-provider/status-utils.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 +10 -0
- package/.medusa/server/src/modules/paypal/utils/credential-resolver.d.ts.map +1 -1
- package/.medusa/server/src/modules/paypal/utils/credential-resolver.js +45 -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 +65 -0
- package/README.md +184 -184
- package/package.json +7 -4
- 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 +69 -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 +611 -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 +184 -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 +700 -275
- package/src/modules/paypal/payment-provider/card-service.ts +693 -855
- package/src/modules/paypal/payment-provider/index.ts +14 -15
- package/src/modules/paypal/payment-provider/service.ts +673 -836
- package/src/modules/paypal/payment-provider/status-utils.ts +116 -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 +315 -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
|
@@ -10,6 +10,29 @@ const partner_1 = require("../utils/partner");
|
|
|
10
10
|
const paypal_fetch_1 = require("../utils/paypal-fetch");
|
|
11
11
|
const webhook_utils_1 = require("./webhook-utils");
|
|
12
12
|
const status_utils_1 = require("./status-utils");
|
|
13
|
+
function toStoredCaptureEntry(capture) {
|
|
14
|
+
return {
|
|
15
|
+
id: capture?.id,
|
|
16
|
+
status: capture?.status,
|
|
17
|
+
amount: capture?.amount,
|
|
18
|
+
final_capture: capture?.final_capture,
|
|
19
|
+
raw: capture,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/** Merge capture entries by id — a later entry for the same id wins. */
|
|
23
|
+
function mergeCaptureEntries(...lists) {
|
|
24
|
+
const byId = new Map();
|
|
25
|
+
const anonymous = [];
|
|
26
|
+
for (const list of lists) {
|
|
27
|
+
for (const entry of list || []) {
|
|
28
|
+
if (entry?.id)
|
|
29
|
+
byId.set(String(entry.id), entry);
|
|
30
|
+
else if (entry)
|
|
31
|
+
anonymous.push(entry);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return [...byId.values(), ...anonymous];
|
|
35
|
+
}
|
|
13
36
|
/**
|
|
14
37
|
* Shared base for the two PayPal payment providers (wallet buttons and advanced
|
|
15
38
|
* card fields). Both providers ran nearly identical credential/token handling,
|
|
@@ -208,6 +231,279 @@ class PayPalProviderBase extends utils_1.AbstractPaymentProvider {
|
|
|
208
231
|
return "error";
|
|
209
232
|
return "pending";
|
|
210
233
|
}
|
|
234
|
+
/**
|
|
235
|
+
* Capture funds for a session — one PayPal capture per Medusa capture row.
|
|
236
|
+
*
|
|
237
|
+
* Medusa calls this once per admin capture (full or partial) with the
|
|
238
|
+
* requested amount living on the Medusa capture row (see
|
|
239
|
+
* `resolveRequestedCaptureAmount`). The decision to call PayPal is driven by
|
|
240
|
+
* what PayPal already holds for the order, NOT by whether the session happens
|
|
241
|
+
* to carry a `capture_id`: after a first partial capture the session always
|
|
242
|
+
* has one, and short-circuiting on it silently skipped every later capture
|
|
243
|
+
* (Medusa recorded the money, PayPal never took it).
|
|
244
|
+
*
|
|
245
|
+
* - Order already fully captured at PayPal → idempotent success with the
|
|
246
|
+
* latest COMPLETED capture (a retry after a crash between the PayPal call
|
|
247
|
+
* and the session write, or a storefront capture-order that Medusa never
|
|
248
|
+
* saw). If everything it holds is still PENDING, fail — funds in flight
|
|
249
|
+
* are not settled money.
|
|
250
|
+
* - Otherwise capture exactly the requested amount; refuse (rather than
|
|
251
|
+
* silently clamp) if more than what remains capturable is requested, since
|
|
252
|
+
* Medusa records the requested amount regardless of what is returned.
|
|
253
|
+
* - The last capture that exhausts the session amount closes the
|
|
254
|
+
* authorization (`final_capture`), unless the session says otherwise.
|
|
255
|
+
*/
|
|
256
|
+
async capturePayment(input) {
|
|
257
|
+
const data = (input.data || {});
|
|
258
|
+
const paypalData = (data.paypal || {});
|
|
259
|
+
const orderId = String(paypalData.order_id || data.order_id || "");
|
|
260
|
+
let authorizationId = String(paypalData.authorization_id || data.authorization_id || "");
|
|
261
|
+
if (!orderId) {
|
|
262
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.INVALID_DATA, "PayPal order_id is required to capture payment");
|
|
263
|
+
}
|
|
264
|
+
const { amount: sessionAmount, currencyCode } = await this.normalizePaymentData(input);
|
|
265
|
+
const exponent = (0, amounts_1.getCurrencyExponent)(currencyCode);
|
|
266
|
+
const roundMoney = (value) => Number(value.toFixed(exponent));
|
|
267
|
+
// The requested (possibly partial) capture amount lives on the Medusa
|
|
268
|
+
// capture row, not in the provider input — resolve it so partial captures
|
|
269
|
+
// don't charge the full session total.
|
|
270
|
+
const amount = await this.resolveRequestedCaptureAmount(input, sessionAmount);
|
|
271
|
+
// Include the amount in the idempotency suffix: PayPal deduplicates by
|
|
272
|
+
// PayPal-Request-Id, so two sequential partial captures of the same order
|
|
273
|
+
// that share an upstream idempotency_key would otherwise collide and the
|
|
274
|
+
// second capture would silently return the first one's result.
|
|
275
|
+
const requestId = this.getIdempotencyKey(input, `capture-${orderId}-${amount}`);
|
|
276
|
+
let debugId = null;
|
|
277
|
+
const storedCaptures = Array.isArray(paypalData.captures)
|
|
278
|
+
? paypalData.captures
|
|
279
|
+
: [];
|
|
280
|
+
const successResult = (capture, liveCaptures, newEntry) => {
|
|
281
|
+
const captureId = capture?.id || capture?.purchase_units?.[0]?.payments?.captures?.[0]?.id;
|
|
282
|
+
return {
|
|
283
|
+
data: {
|
|
284
|
+
...(input.data || {}),
|
|
285
|
+
paypal: {
|
|
286
|
+
...paypalData,
|
|
287
|
+
order_id: orderId,
|
|
288
|
+
capture_id: captureId,
|
|
289
|
+
capture,
|
|
290
|
+
authorization_id: authorizationId || paypalData.authorization_id,
|
|
291
|
+
captures: mergeCaptureEntries(storedCaptures, liveCaptures.map(toStoredCaptureEntry), newEntry ? [newEntry] : undefined),
|
|
292
|
+
},
|
|
293
|
+
captured_at: new Date().toISOString(),
|
|
294
|
+
},
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
try {
|
|
298
|
+
const { accessToken, base } = await this.getPayPalAccessToken();
|
|
299
|
+
const order = await this.getOrderDetails(orderId).catch(() => null);
|
|
300
|
+
const liveCaptures = order?.purchase_units?.[0]?.payments?.captures ?? [];
|
|
301
|
+
if (order) {
|
|
302
|
+
// What PayPal has already taken (or reserved) for this order, and how
|
|
303
|
+
// much of it is settled.
|
|
304
|
+
const alreadyCaptured = roundMoney((0, status_utils_1.sumCountedCaptureAmounts)(liveCaptures));
|
|
305
|
+
const settled = roundMoney((0, status_utils_1.sumSettledCaptureAmounts)(liveCaptures));
|
|
306
|
+
const remaining = roundMoney(sessionAmount - alreadyCaptured);
|
|
307
|
+
const requested = roundMoney(amount);
|
|
308
|
+
// Reconcile against Medusa's own ledger. Medusa creates the capture row
|
|
309
|
+
// BEFORE calling us and deletes it when the call (or its follow-up
|
|
310
|
+
// write) fails, so a retry arrives with a fresh row and a fresh
|
|
311
|
+
// PayPal-Request-Id. Whatever PayPal holds beyond the captures Medusa
|
|
312
|
+
// has booked on this payment is therefore a capture Medusa lost —
|
|
313
|
+
// that money IS this capture, and must not be taken from the buyer a
|
|
314
|
+
// second time. (Also covers a storefront capture-order the session
|
|
315
|
+
// never recorded.) Falls through to the amount-based checks below when
|
|
316
|
+
// the ledger can't be read.
|
|
317
|
+
const captureRowId = input?.context?.idempotency_key?.trim() || "";
|
|
318
|
+
const booked = captureRowId
|
|
319
|
+
? await this.paypal.getBookedCaptureTotal(captureRowId)
|
|
320
|
+
: null;
|
|
321
|
+
const unbookedHeld = booked === null ? 0 : roundMoney(alreadyCaptured - booked);
|
|
322
|
+
const unbookedSettled = booked === null ? 0 : roundMoney(settled - booked);
|
|
323
|
+
const pickCompletedCapture = () => [...liveCaptures]
|
|
324
|
+
.reverse()
|
|
325
|
+
.find((c) => (0, status_utils_1.isCaptureCompleted)(c) &&
|
|
326
|
+
roundMoney(Number(c?.amount?.value)) === requested) ?? [...liveCaptures].reverse().find((c) => (0, status_utils_1.isCaptureCompleted)(c));
|
|
327
|
+
if (booked !== null && unbookedHeld >= requested && requested > 0) {
|
|
328
|
+
const completed = pickCompletedCapture();
|
|
329
|
+
if (!completed || unbookedSettled < requested) {
|
|
330
|
+
// The unbooked money is still PENDING (eCheck / review): not
|
|
331
|
+
// settled, so it can't be booked yet — the CAPTURE.COMPLETED
|
|
332
|
+
// webhook settles it later.
|
|
333
|
+
throw new Error(`PayPal already holds ${(0, amounts_1.formatAmountForPayPal)(unbookedHeld, currencyCode)} ${currencyCode} for order ${orderId} that Medusa has not booked, ` +
|
|
334
|
+
`but only ${(0, amounts_1.formatAmountForPayPal)(unbookedSettled, currencyCode)} of it has COMPLETED (statuses: ${liveCaptures.map((c) => c?.status).join(", ") || "none"}). The payment was not recorded as captured.`);
|
|
335
|
+
}
|
|
336
|
+
console.info(`[PayPal] capturePayment: order ${orderId} already holds ${unbookedHeld} ${currencyCode} not booked in Medusa (PayPal ${alreadyCaptured}, Medusa ${booked}); returning capture ${completed.id} instead of capturing again`);
|
|
337
|
+
return successResult(completed, liveCaptures);
|
|
338
|
+
}
|
|
339
|
+
if (remaining <= 0) {
|
|
340
|
+
// Nothing left to capture at PayPal. Only settled money may be
|
|
341
|
+
// booked: a PENDING capture that fills the remainder is not
|
|
342
|
+
// captured yet.
|
|
343
|
+
const completed = pickCompletedCapture();
|
|
344
|
+
if (!completed || settled < roundMoney(sessionAmount)) {
|
|
345
|
+
throw new Error(`PayPal already holds captures covering the full amount for order ${orderId}, ` +
|
|
346
|
+
`but only ${(0, amounts_1.formatAmountForPayPal)(settled, currencyCode)} ${currencyCode} has COMPLETED (statuses: ${liveCaptures.map((c) => c?.status).join(", ") || "none"}). The payment was not recorded as captured.`);
|
|
347
|
+
}
|
|
348
|
+
console.info(`[PayPal] capturePayment: order ${orderId} is already fully captured at PayPal (${alreadyCaptured} ${currencyCode}); returning capture ${completed.id}`);
|
|
349
|
+
return successResult(completed, liveCaptures);
|
|
350
|
+
}
|
|
351
|
+
if (requested > remaining) {
|
|
352
|
+
throw new Error(`PayPal can only capture ${(0, amounts_1.formatAmountForPayPal)(remaining, currencyCode)} ${currencyCode} more for order ${orderId} ` +
|
|
353
|
+
`(${(0, amounts_1.formatAmountForPayPal)(alreadyCaptured, currencyCode)} of ${(0, amounts_1.formatAmountForPayPal)(sessionAmount, currencyCode)} already captured); ` +
|
|
354
|
+
`${(0, amounts_1.formatAmountForPayPal)(amount, currencyCode)} was requested.`);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
else {
|
|
358
|
+
// PayPal unreachable for the order lookup: the only safe short-circuit
|
|
359
|
+
// is a stored capture that demonstrably COMPLETED for the full session
|
|
360
|
+
// amount. Anything else proceeds to the capture call below, where the
|
|
361
|
+
// PayPal-Request-Id keeps a retry idempotent and PayPal itself rejects
|
|
362
|
+
// an over-capture.
|
|
363
|
+
const stored = paypalData.capture;
|
|
364
|
+
const storedAmount = Number(stored?.amount?.value ??
|
|
365
|
+
stored?.purchase_units?.[0]?.payments?.captures?.[0]?.amount?.value);
|
|
366
|
+
if (stored &&
|
|
367
|
+
(0, status_utils_1.isCaptureCompleted)(stored) &&
|
|
368
|
+
Number.isFinite(storedAmount) &&
|
|
369
|
+
roundMoney(storedAmount) >= roundMoney(sessionAmount)) {
|
|
370
|
+
return successResult(stored, []);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
const resolvedIntent = String(order?.intent || paypalData.order?.intent || data.intent || "").toUpperCase();
|
|
374
|
+
if (!authorizationId && resolvedIntent === "AUTHORIZE") {
|
|
375
|
+
const liveAuthorizationId = order?.purchase_units?.[0]?.payments?.authorizations?.[0]?.id;
|
|
376
|
+
if (liveAuthorizationId) {
|
|
377
|
+
authorizationId = String(liveAuthorizationId);
|
|
378
|
+
}
|
|
379
|
+
else {
|
|
380
|
+
const authorizeResp = await (0, paypal_fetch_1.paypalFetch)(`${base}/v2/checkout/orders/${encodeURIComponent(orderId)}/authorize`, {
|
|
381
|
+
method: "POST",
|
|
382
|
+
headers: {
|
|
383
|
+
Authorization: `Bearer ${accessToken}`,
|
|
384
|
+
"Content-Type": "application/json",
|
|
385
|
+
"PayPal-Request-Id": `${requestId}-auth`,
|
|
386
|
+
"PayPal-Partner-Attribution-Id": partner_1.PAYPAL_PARTNER_ATTRIBUTION_ID,
|
|
387
|
+
},
|
|
388
|
+
});
|
|
389
|
+
const authorizeText = await authorizeResp.text();
|
|
390
|
+
debugId = authorizeResp.headers.get("paypal-debug-id");
|
|
391
|
+
if (!authorizeResp.ok) {
|
|
392
|
+
throw new Error(`PayPal authorize order error (${authorizeResp.status}): ${authorizeText}${debugId ? ` debug_id=${debugId}` : ""}`);
|
|
393
|
+
}
|
|
394
|
+
const authorization = JSON.parse(authorizeText);
|
|
395
|
+
authorizationId =
|
|
396
|
+
authorization?.purchase_units?.[0]?.payments?.authorizations?.[0]
|
|
397
|
+
?.id;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
const explicitFinalCapture = paypalData.is_final_capture ??
|
|
401
|
+
data.is_final_capture ??
|
|
402
|
+
data.final_capture ??
|
|
403
|
+
undefined;
|
|
404
|
+
const captureValue = amount > 0 ? (0, amounts_1.formatAmountForPayPal)(amount, currencyCode) : null;
|
|
405
|
+
// `amount` and `final_capture` are only honored on the authorizations
|
|
406
|
+
// capture endpoint. The orders capture endpoint always captures the FULL
|
|
407
|
+
// order and silently ignores an `amount` body — so a partial amount there
|
|
408
|
+
// would over-capture while we record the smaller requested value. Route
|
|
409
|
+
// partial captures through the authorization, and fail closed if a
|
|
410
|
+
// partial capture is attempted against a capture-intent order.
|
|
411
|
+
let capturePayload;
|
|
412
|
+
let captureUrl;
|
|
413
|
+
if (authorizationId) {
|
|
414
|
+
captureUrl = `${base}/v2/payments/authorizations/${encodeURIComponent(authorizationId)}/capture`;
|
|
415
|
+
// Close the authorization once the session amount is exhausted, unless
|
|
416
|
+
// the session explicitly says otherwise.
|
|
417
|
+
const finalCapture = typeof explicitFinalCapture === "boolean"
|
|
418
|
+
? explicitFinalCapture
|
|
419
|
+
: order
|
|
420
|
+
? roundMoney((0, status_utils_1.sumCountedCaptureAmounts)(liveCaptures) + amount) >=
|
|
421
|
+
roundMoney(sessionAmount)
|
|
422
|
+
: undefined;
|
|
423
|
+
capturePayload = {
|
|
424
|
+
...(captureValue
|
|
425
|
+
? { amount: { currency_code: currencyCode, value: captureValue } }
|
|
426
|
+
: {}),
|
|
427
|
+
...(typeof finalCapture === "boolean"
|
|
428
|
+
? { final_capture: finalCapture }
|
|
429
|
+
: {}),
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
else {
|
|
433
|
+
captureUrl = `${base}/v2/checkout/orders/${encodeURIComponent(orderId)}/capture`;
|
|
434
|
+
capturePayload = {};
|
|
435
|
+
const orderTotal = order?.purchase_units?.[0]?.amount?.value;
|
|
436
|
+
if (captureValue && orderTotal && captureValue !== String(orderTotal)) {
|
|
437
|
+
throw new Error(`PayPal partial capture (${captureValue} ${currencyCode}) is not supported for ` +
|
|
438
|
+
`capture-intent orders (order total ${orderTotal}). Create the order with intent ` +
|
|
439
|
+
`AUTHORIZE to capture a partial amount.`);
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
// Retry transient 5xx/429/timeout: the PayPal-Request-Id makes the
|
|
443
|
+
// capture idempotent, so a retry after a network blip re-uses the same
|
|
444
|
+
// capture instead of double-charging. `Prefer: return=representation`
|
|
445
|
+
// asks for the full capture resource (amount, final_capture, …) instead
|
|
446
|
+
// of the default id/status/links stub, so the session keeps a usable
|
|
447
|
+
// record of every capture.
|
|
448
|
+
const ppResp = await (0, paypal_fetch_1.paypalFetchWithRetry)(captureUrl, {
|
|
449
|
+
method: "POST",
|
|
450
|
+
headers: {
|
|
451
|
+
Authorization: `Bearer ${accessToken}`,
|
|
452
|
+
"Content-Type": "application/json",
|
|
453
|
+
Prefer: "return=representation",
|
|
454
|
+
"PayPal-Request-Id": requestId,
|
|
455
|
+
"PayPal-Partner-Attribution-Id": partner_1.PAYPAL_PARTNER_ATTRIBUTION_ID,
|
|
456
|
+
},
|
|
457
|
+
body: JSON.stringify(capturePayload),
|
|
458
|
+
});
|
|
459
|
+
const ppText = await ppResp.text();
|
|
460
|
+
debugId = ppResp.headers.get("paypal-debug-id");
|
|
461
|
+
if (!ppResp.ok) {
|
|
462
|
+
throw new Error(`PayPal capture error (${ppResp.status}): ${ppText}${debugId ? ` debug_id=${debugId}` : ""}`);
|
|
463
|
+
}
|
|
464
|
+
const capture = JSON.parse(ppText);
|
|
465
|
+
// A 2xx response does NOT mean the funds were captured. PayPal returns 201
|
|
466
|
+
// for captures that are PENDING (pending review / eCheck), DECLINED, or
|
|
467
|
+
// FAILED. Recording any of these as "captured" books money that never
|
|
468
|
+
// settled, so only a COMPLETED capture is treated as success.
|
|
469
|
+
const captureStatus = (0, status_utils_1.extractCaptureStatus)(capture);
|
|
470
|
+
if (captureStatus !== "COMPLETED") {
|
|
471
|
+
throw new Error(`PayPal capture did not complete (status=${captureStatus || "UNKNOWN"}). ` +
|
|
472
|
+
`The payment was not captured.${debugId ? ` debug_id=${debugId}` : ""}`);
|
|
473
|
+
}
|
|
474
|
+
const captureResource = authorizationId
|
|
475
|
+
? capture
|
|
476
|
+
: (capture?.purchase_units?.[0]?.payments?.captures?.[0] ?? capture);
|
|
477
|
+
const captureId = captureResource?.id || capture?.id;
|
|
478
|
+
await this.recordSuccess("capture_success");
|
|
479
|
+
await this.recordPaymentEvent("capture", {
|
|
480
|
+
order_id: orderId,
|
|
481
|
+
capture_id: captureId,
|
|
482
|
+
authorization_id: authorizationId || undefined,
|
|
483
|
+
amount,
|
|
484
|
+
currency_code: currencyCode,
|
|
485
|
+
request_id: requestId,
|
|
486
|
+
});
|
|
487
|
+
return successResult(capture, liveCaptures, {
|
|
488
|
+
...toStoredCaptureEntry(captureResource),
|
|
489
|
+
id: captureId,
|
|
490
|
+
raw: capture,
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
catch (error) {
|
|
494
|
+
await this.recordFailure("capture_failed", {
|
|
495
|
+
order_id: orderId,
|
|
496
|
+
request_id: requestId,
|
|
497
|
+
debug_id: debugId,
|
|
498
|
+
message: error?.message,
|
|
499
|
+
});
|
|
500
|
+
// Surface the real reason: Medusa masks non-MedusaErrors as a generic
|
|
501
|
+
// "unknown error" in production, hiding the PayPal failure.
|
|
502
|
+
throw error instanceof utils_1.MedusaError
|
|
503
|
+
? error
|
|
504
|
+
: new utils_1.MedusaError(utils_1.MedusaError.Types.INVALID_DATA, error?.message || "PayPal capture failed.");
|
|
505
|
+
}
|
|
506
|
+
}
|
|
211
507
|
async createAccountHolder(input) {
|
|
212
508
|
const customerId = input.context?.customer?.id;
|
|
213
509
|
const externalId = customerId
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-provider.js","sourceRoot":"","sources":["../../../../../../src/modules/paypal/payment-provider/base-provider.ts"],"names":[],"mappings":";;;AAAA,qDAAmE;AACnE,mCAAmC;AASnC,8CAAwE;AACxE,oDAG4B;AAC5B,sEAAuE;AACvE,8CAAgE;AAChE,wDAAmD;AACnD,mDAA+D;AAC/D,iDAAuD;AAIvD;;;;;;;;GAQG;AACH,MAAsB,kBAAmB,SAAQ,+BAAgC;IAC5D,QAAQ,CAAS;IAC1B,MAAM,CAA0B;IAO1C,YAAY,MAA2B,EAAE,OAAgB;QACvD,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;QACtB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;QACvB,MAAM,EAAE,GAAG,kBAAkB,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAA;QACzD,IAAI,CAAC,MAAM,GAAG,IAAI,8CAAwB,CAAC,EAAE,CAAC,CAAA;IAChD,CAAC;IAES,MAAM,CAAC,mBAAmB,CAAC,MAA2B;QAC9D,KAAK,MAAM,GAAG,IAAI,CAAC,mBAAmB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OAAO,SAAS,CAAA;QACjC,IAAI,UAAU,KAAK,WAAW;YAAE,OAAO,UAAU,CAAA;QACjD,IAAI,UAAU,KAAK,UAAU;YAAE,OAAO,YAAY,CAAA;QAClD,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;YAAE,OAAO,UAAU,CAAA;QACnE,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,uBAAuB,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;YAAE,OAAO,SAAS,CAAA;QACxF,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;YAAE,OAAO,OAAO,CAAA;QAC9D,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,KAAK,CAAC,mBAAmB,CACvB,KAA+B;QAE/B,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,CAAA;QAC9C,MAAM,UAAU,GAAG,UAAU;YAC3B,CAAC,CAAC,UAAU,UAAU,EAAE;YACxB,CAAC,CAAC,UAAU,IAAI,CAAC,iBAAiB,EAAE,EAAE,CAAA;QACxC,OAAO;YACL,EAAE,EAAE,UAAU;YACd,IAAI,EAAE;gBACJ,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,IAAI,IAAI;gBAC7C,WAAW,EAAE,UAAU,IAAI,IAAI;aAChC;SACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,MAA0B;QAC5C,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAA;IACrB,CAAC;IAED,KAAK,CAAC,uBAAuB,CAC3B,OAA0C;QAE1C,OAAO,IAAA,6CAA6B,EAAC,OAAO,CAAC,CAAA;IAC/C,CAAC;CACF;AAlPD,gDAkPC"}
|
|
1
|
+
{"version":3,"file":"base-provider.js","sourceRoot":"","sources":["../../../../../../src/modules/paypal/payment-provider/base-provider.ts"],"names":[],"mappings":";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AC,iBAAiB,EAAE,EAAE,CAAA;QACxC,OAAO;YACL,EAAE,EAAE,UAAU;YACd,IAAI,EAAE;gBACJ,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,IAAI,IAAI;gBAC7C,WAAW,EAAE,UAAU,IAAI,IAAI;aAChC;SACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,aAAa,CACjB,MAA0B;QAE1B,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAA;IACrB,CAAC;IAED,KAAK,CAAC,uBAAuB,CAC3B,OAA0C;QAE1C,OAAO,IAAA,6CAA6B,EAAC,OAAO,CAAC,CAAA;IAC/C,CAAC;CACF;AA7mBD,gDA6mBC"}
|
|
@@ -1,17 +1,24 @@
|
|
|
1
|
-
import type { AuthorizePaymentInput, AuthorizePaymentOutput,
|
|
1
|
+
import type { AuthorizePaymentInput, AuthorizePaymentOutput, CancelPaymentInput, CancelPaymentOutput, GetPaymentStatusInput, GetPaymentStatusOutput, InitiatePaymentInput, InitiatePaymentOutput, RefundPaymentInput, RefundPaymentOutput, RetrievePaymentInput, RetrievePaymentOutput, UpdatePaymentInput, UpdatePaymentOutput } from "@medusajs/framework/types";
|
|
2
2
|
import { PayPalProviderBase } from "./base-provider";
|
|
3
|
+
/**
|
|
4
|
+
* PayPal Advanced (hosted) Card Fields payment provider —
|
|
5
|
+
* `pp_paypal_card_paypal_card`.
|
|
6
|
+
*
|
|
7
|
+
* Shares the order-based flow of the wallet provider but adds admin-configured
|
|
8
|
+
* card-brand restrictions and 3-D Secure handling. Card orders are created
|
|
9
|
+
* with a `payment_source.card` verification method (see create-order).
|
|
10
|
+
*/
|
|
3
11
|
declare class PayPalAdvancedCardProvider extends PayPalProviderBase {
|
|
4
12
|
static identifier: string;
|
|
5
13
|
protected readonly sessionPrefix = "pp_card";
|
|
6
14
|
protected readonly idempotencyPrefix = "pp-card";
|
|
7
15
|
initiatePayment(input: InitiatePaymentInput): Promise<InitiatePaymentOutput>;
|
|
8
16
|
updatePayment(input: UpdatePaymentInput): Promise<UpdatePaymentOutput>;
|
|
9
|
-
authorizePayment(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
getPaymentStatus(_input: GetPaymentStatusInput): Promise<GetPaymentStatusOutput>;
|
|
17
|
+
authorizePayment(input: AuthorizePaymentInput): Promise<AuthorizePaymentOutput>;
|
|
18
|
+
cancelPayment(input: CancelPaymentInput): Promise<CancelPaymentOutput>;
|
|
19
|
+
refundPayment(input: RefundPaymentInput): Promise<RefundPaymentOutput>;
|
|
20
|
+
retrievePayment(input: RetrievePaymentInput): Promise<RetrievePaymentOutput>;
|
|
21
|
+
getPaymentStatus(input: GetPaymentStatusInput): Promise<GetPaymentStatusOutput>;
|
|
15
22
|
}
|
|
16
23
|
export default PayPalAdvancedCardProvider;
|
|
17
24
|
export { PayPalAdvancedCardProvider };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-service.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/paypal/payment-provider/card-service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACtB,
|
|
1
|
+
{"version":3,"file":"card-service.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/paypal/payment-provider/card-service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,2BAA2B,CAAA;AASlC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEpD;;;;;;;GAOG;AACH,cAAM,0BAA2B,SAAQ,kBAAkB;IACzD,MAAM,CAAC,UAAU,SAAgB;IAEjC,SAAS,CAAC,QAAQ,CAAC,aAAa,aAAY;IAC5C,SAAS,CAAC,QAAQ,CAAC,iBAAiB,aAAY;IAE1C,eAAe,CACnB,KAAK,EAAE,oBAAoB,GAC1B,OAAO,CAAC,qBAAqB,CAAC;IAoB3B,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAyBtE,gBAAgB,CACpB,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,sBAAsB,CAAC;IAkQ5B,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAkJtE,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAsItE,eAAe,CACnB,KAAK,EAAE,oBAAoB,GAC1B,OAAO,CAAC,qBAAqB,CAAC;IA0B3B,gBAAgB,CACpB,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,sBAAsB,CAAC;CA+BnC;AAED,eAAe,0BAA0B,CAAA;AACzC,OAAO,EAAE,0BAA0B,EAAE,CAAA"}
|