@open-mercato/core 0.6.6-develop.6551.1.1511bfa890 → 0.6.6
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/.turbo/turbo-build.log +2 -2
- package/dist/generated/entities.ids.generated.js +0 -1
- package/dist/generated/entities.ids.generated.js.map +2 -2
- package/dist/generated/entity-fields-registry.js +0 -12
- package/dist/generated/entity-fields-registry.js.map +2 -2
- package/dist/modules/api_keys/api/keys/route.js +13 -30
- package/dist/modules/api_keys/api/keys/route.js.map +2 -2
- package/dist/modules/api_keys/cli.js +1 -2
- package/dist/modules/api_keys/cli.js.map +2 -2
- package/dist/modules/attachments/api/file/[id]/route.js +7 -9
- package/dist/modules/attachments/api/file/[id]/route.js.map +2 -2
- package/dist/modules/attachments/api/image/[id]/[[...slug]]/route.js +7 -9
- package/dist/modules/attachments/api/image/[id]/[[...slug]]/route.js.map +2 -2
- package/dist/modules/attachments/api/route.js +17 -21
- package/dist/modules/attachments/api/route.js.map +2 -2
- package/dist/modules/attachments/components/AttachmentContentPreview.js +35 -6
- package/dist/modules/attachments/components/AttachmentContentPreview.js.map +2 -2
- package/dist/modules/audit_logs/backend/audit-logs/page.js +24 -14
- package/dist/modules/audit_logs/backend/audit-logs/page.js.map +2 -2
- package/dist/modules/auth/api/users/route.js +2 -6
- package/dist/modules/auth/api/users/route.js.map +2 -2
- package/dist/modules/auth/cli.js +2 -3
- package/dist/modules/auth/cli.js.map +2 -2
- package/dist/modules/configs/lib/upgrade-actions.js +0 -22
- package/dist/modules/configs/lib/upgrade-actions.js.map +2 -2
- package/dist/modules/customer_accounts/api/admin/roles/[id]/acl.js +0 -1
- package/dist/modules/customer_accounts/api/admin/roles/[id]/acl.js.map +2 -2
- package/dist/modules/customer_accounts/api/admin/roles/[id].js +3 -17
- package/dist/modules/customer_accounts/api/admin/roles/[id].js.map +2 -2
- package/dist/modules/customer_accounts/api/portal/users/[id]/roles.js +1 -6
- package/dist/modules/customer_accounts/api/portal/users/[id]/roles.js.map +2 -2
- package/dist/modules/customer_accounts/api/portal/users-invite.js +1 -6
- package/dist/modules/customer_accounts/api/portal/users-invite.js.map +2 -2
- package/dist/modules/customer_accounts/services/customerInvitationService.js +0 -1
- package/dist/modules/customer_accounts/services/customerInvitationService.js.map +2 -2
- package/dist/modules/customer_accounts/services/customerRbacService.js +1 -6
- package/dist/modules/customer_accounts/services/customerRbacService.js.map +2 -2
- package/dist/modules/customer_accounts/widgets/injection-table.js +2 -0
- package/dist/modules/customer_accounts/widgets/injection-table.js.map +2 -2
- package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js +1 -7
- package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/deals/pipeline/components/ViewTabsRow.js +2 -2
- package/dist/modules/customers/backend/customers/deals/pipeline/components/ViewTabsRow.js.map +2 -2
- package/dist/modules/customers/components/detail/CompanyDetailTabs.js +43 -37
- package/dist/modules/customers/components/detail/CompanyDetailTabs.js.map +2 -2
- package/dist/modules/customers/components/detail/DealDetailTabs.js +35 -23
- package/dist/modules/customers/components/detail/DealDetailTabs.js.map +2 -2
- package/dist/modules/customers/components/detail/DetailTabsLayout.js +21 -6
- package/dist/modules/customers/components/detail/DetailTabsLayout.js.map +2 -2
- package/dist/modules/customers/components/detail/MobilePersonDetail.js +32 -26
- package/dist/modules/customers/components/detail/MobilePersonDetail.js.map +2 -2
- package/dist/modules/customers/components/detail/PersonDetailTabs.js +39 -29
- package/dist/modules/customers/components/detail/PersonDetailTabs.js.map +2 -2
- package/dist/modules/dashboards/api/roles/widgets/route.js +3 -22
- package/dist/modules/dashboards/api/roles/widgets/route.js.map +2 -2
- package/dist/modules/dashboards/api/users/widgets/route.js +3 -22
- package/dist/modules/dashboards/api/users/widgets/route.js.map +2 -2
- package/dist/modules/dashboards/cli.js +3 -4
- package/dist/modules/dashboards/cli.js.map +2 -2
- package/dist/modules/dashboards/lib/widgetAssignmentScope.js +1 -9
- package/dist/modules/dashboards/lib/widgetAssignmentScope.js.map +2 -2
- package/dist/modules/dictionaries/commands/entries.js +14 -7
- package/dist/modules/dictionaries/commands/entries.js.map +2 -2
- package/dist/modules/dictionaries/commands/entry-operations.js +16 -7
- package/dist/modules/dictionaries/commands/entry-operations.js.map +2 -2
- package/dist/modules/dictionaries/commands/factory.js +3 -9
- package/dist/modules/dictionaries/commands/factory.js.map +2 -2
- package/dist/modules/dictionaries/fields/dictionary.js +41 -56
- package/dist/modules/dictionaries/fields/dictionary.js.map +2 -2
- package/dist/modules/directory/utils/organizationScope.js +3 -10
- package/dist/modules/directory/utils/organizationScope.js.map +2 -2
- package/dist/modules/entities/api/records.js +4 -5
- package/dist/modules/entities/api/records.js.map +2 -2
- package/dist/modules/entities/backend/entities/system/[entityId]/page.meta.js +0 -1
- package/dist/modules/entities/backend/entities/system/[entityId]/page.meta.js.map +2 -2
- package/dist/modules/entities/backend/entities/user/[entityId]/page.js +49 -49
- package/dist/modules/entities/backend/entities/user/[entityId]/page.js.map +2 -2
- package/dist/modules/entities/backend/entities/user/[entityId]/page.meta.js +0 -1
- package/dist/modules/entities/backend/entities/user/[entityId]/page.meta.js.map +2 -2
- package/dist/modules/entities/cli.js +1 -2
- package/dist/modules/entities/cli.js.map +2 -2
- package/dist/modules/feature_toggles/api/check/boolean/route.js +14 -0
- package/dist/modules/feature_toggles/api/check/boolean/route.js.map +2 -2
- package/dist/modules/feature_toggles/defaults.json +0 -8
- package/dist/modules/integrations/backend/integrations/[id]/page.js +80 -9
- package/dist/modules/integrations/backend/integrations/[id]/page.js.map +2 -2
- package/dist/modules/payment_gateways/data/entities.js +0 -45
- package/dist/modules/payment_gateways/data/entities.js.map +2 -2
- package/dist/modules/payment_gateways/lib/gateway-service.js +38 -173
- package/dist/modules/payment_gateways/lib/gateway-service.js.map +3 -3
- package/dist/modules/planner/backend/planner/availability-rulesets/[id]/page.js +14 -16
- package/dist/modules/planner/backend/planner/availability-rulesets/[id]/page.js.map +2 -2
- package/dist/modules/planner/components/AvailabilityRulesEditor.js +30 -18
- package/dist/modules/planner/components/AvailabilityRulesEditor.js.map +2 -2
- package/dist/modules/query_index/api/status.js +8 -2
- package/dist/modules/query_index/api/status.js.map +2 -2
- package/dist/modules/resources/backend/resources/resources/[id]/page.js +24 -24
- package/dist/modules/resources/backend/resources/resources/[id]/page.js.map +2 -2
- package/dist/modules/sales/backend/sales/channels/create/page.js +0 -6
- package/dist/modules/sales/backend/sales/channels/create/page.js.map +2 -2
- package/dist/modules/sales/backend/sales/channels/create/page.meta.js +0 -2
- package/dist/modules/sales/backend/sales/channels/create/page.meta.js.map +2 -2
- package/dist/modules/sales/backend/sales/channels/offers/page.js +0 -6
- package/dist/modules/sales/backend/sales/channels/offers/page.js.map +2 -2
- package/dist/modules/sales/backend/sales/channels/offers/page.meta.js +0 -2
- package/dist/modules/sales/backend/sales/channels/offers/page.meta.js.map +2 -2
- package/dist/modules/sales/backend/sales/channels/page.js +0 -6
- package/dist/modules/sales/backend/sales/channels/page.js.map +2 -2
- package/dist/modules/sales/backend/sales/channels/page.meta.js +0 -2
- package/dist/modules/sales/backend/sales/channels/page.meta.js.map +2 -2
- package/dist/modules/sales/backend/sales/documents/[id]/page.js +4 -6
- package/dist/modules/sales/backend/sales/documents/[id]/page.js.map +2 -2
- package/dist/modules/sales/commands/documents.js +0 -44
- package/dist/modules/sales/commands/documents.js.map +2 -2
- package/dist/modules/sales/commands/returns.js +27 -2
- package/dist/modules/sales/commands/returns.js.map +2 -2
- package/dist/modules/sales/components/documents/AddressesSection.js +2 -6
- package/dist/modules/sales/components/documents/AddressesSection.js.map +2 -2
- package/dist/modules/sales/components/documents/ItemsSection.js +0 -1
- package/dist/modules/sales/components/documents/ItemsSection.js.map +2 -2
- package/dist/modules/sales/components/documents/LineItemDialog.js +0 -9
- package/dist/modules/sales/components/documents/LineItemDialog.js.map +2 -2
- package/dist/modules/sales/components/documents/SalesDocumentForm.js +3 -51
- package/dist/modules/sales/components/documents/SalesDocumentForm.js.map +2 -2
- package/dist/modules/sales/components/documents/SalesDocumentsTable.js +8 -10
- package/dist/modules/sales/components/documents/SalesDocumentsTable.js.map +2 -2
- package/dist/modules/sales/components/documents/ShipmentDialog.js +38 -59
- package/dist/modules/sales/components/documents/ShipmentDialog.js.map +2 -2
- package/dist/modules/sales/lib/shipments/snapshots.js +1 -27
- package/dist/modules/sales/lib/shipments/snapshots.js.map +2 -2
- package/dist/modules/staff/backend/staff/team-members/[id]/page.js +25 -22
- package/dist/modules/staff/backend/staff/team-members/[id]/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/teams/[id]/edit/page.js +14 -12
- package/dist/modules/staff/backend/staff/teams/[id]/edit/page.js.map +2 -2
- package/dist/modules/staff/lib/timesheets-projects-ui/SavedViewTabs.js +29 -10
- package/dist/modules/staff/lib/timesheets-projects-ui/SavedViewTabs.js.map +2 -2
- package/dist/modules/sync_excel/lib/adapters/customers.js +20 -19
- package/dist/modules/sync_excel/lib/adapters/customers.js.map +2 -2
- package/dist/modules/sync_excel/lib/parser.js +0 -185
- package/dist/modules/sync_excel/lib/parser.js.map +2 -2
- package/dist/modules/sync_excel/lib/upload-storage.js +1 -20
- package/dist/modules/sync_excel/lib/upload-storage.js.map +2 -2
- package/dist/modules/workflows/frontend/checkout-demo/page.js +8 -1
- package/dist/modules/workflows/frontend/checkout-demo/page.js.map +2 -2
- package/dist/modules/workflows/lib/activity-executor.js +1 -1
- package/dist/modules/workflows/lib/activity-executor.js.map +2 -2
- package/dist/modules/workflows/lib/find-definition.js +18 -2
- package/dist/modules/workflows/lib/find-definition.js.map +2 -2
- package/dist/modules/workflows/lib/signal-handler.js +3 -2
- package/dist/modules/workflows/lib/signal-handler.js.map +2 -2
- package/dist/modules/workflows/lib/step-handler.js +4 -8
- package/dist/modules/workflows/lib/step-handler.js.map +2 -2
- package/dist/modules/workflows/lib/task-handler.js +3 -5
- package/dist/modules/workflows/lib/task-handler.js.map +2 -2
- package/dist/modules/workflows/lib/timer-handler.js +2 -1
- package/dist/modules/workflows/lib/timer-handler.js.map +2 -2
- package/dist/modules/workflows/lib/transition-handler.js +5 -13
- package/dist/modules/workflows/lib/transition-handler.js.map +2 -2
- package/dist/modules/workflows/lib/workflow-executor.js +11 -9
- package/dist/modules/workflows/lib/workflow-executor.js.map +2 -2
- package/dist/modules/workflows/migrations/Migration20260715120000.js +68 -0
- package/dist/modules/workflows/migrations/Migration20260715120000.js.map +7 -0
- package/dist/modules/workflows/migrations/Migration20260716120000.js +24 -0
- package/dist/modules/workflows/migrations/Migration20260716120000.js.map +7 -0
- package/dist/modules/workflows/workflows.js +2 -0
- package/dist/modules/workflows/workflows.js.map +2 -2
- package/generated/entities.ids.generated.ts +0 -1
- package/generated/entity-fields-registry.ts +0 -12
- package/package.json +8 -9
- package/src/modules/api_keys/api/keys/route.ts +13 -36
- package/src/modules/api_keys/cli.ts +3 -2
- package/src/modules/attachments/api/file/[id]/route.ts +7 -11
- package/src/modules/attachments/api/image/[id]/[[...slug]]/route.ts +7 -11
- package/src/modules/attachments/api/route.ts +21 -26
- package/src/modules/attachments/components/AttachmentContentPreview.tsx +44 -9
- package/src/modules/audit_logs/backend/audit-logs/page.tsx +22 -12
- package/src/modules/auth/api/users/route.ts +2 -11
- package/src/modules/auth/cli.ts +2 -3
- package/src/modules/configs/i18n/de.json +1 -5
- package/src/modules/configs/i18n/en.json +1 -5
- package/src/modules/configs/i18n/es.json +1 -5
- package/src/modules/configs/i18n/pl.json +1 -5
- package/src/modules/configs/lib/upgrade-actions.ts +0 -24
- package/src/modules/customer_accounts/AGENTS.md +6 -8
- package/src/modules/customer_accounts/api/admin/roles/[id]/acl.ts +0 -1
- package/src/modules/customer_accounts/api/admin/roles/[id].ts +3 -17
- package/src/modules/customer_accounts/api/portal/users/[id]/roles.ts +1 -6
- package/src/modules/customer_accounts/api/portal/users-invite.ts +1 -6
- package/src/modules/customer_accounts/services/customerInvitationService.ts +0 -1
- package/src/modules/customer_accounts/services/customerRbacService.ts +2 -9
- package/src/modules/customer_accounts/widgets/injection-table.ts +2 -0
- package/src/modules/customers/backend/customers/companies-v2/[id]/page.tsx +1 -11
- package/src/modules/customers/backend/customers/deals/pipeline/components/ViewTabsRow.tsx +2 -6
- package/src/modules/customers/components/detail/CompanyDetailTabs.tsx +55 -39
- package/src/modules/customers/components/detail/DealDetailTabs.tsx +49 -24
- package/src/modules/customers/components/detail/DetailTabsLayout.tsx +24 -13
- package/src/modules/customers/components/detail/MobilePersonDetail.tsx +31 -25
- package/src/modules/customers/components/detail/PersonDetailTabs.tsx +50 -29
- package/src/modules/dashboards/api/roles/widgets/route.ts +3 -22
- package/src/modules/dashboards/api/users/widgets/route.ts +3 -22
- package/src/modules/dashboards/cli.ts +9 -4
- package/src/modules/dashboards/lib/widgetAssignmentScope.ts +0 -18
- package/src/modules/dictionaries/commands/entries.ts +16 -7
- package/src/modules/dictionaries/commands/entry-operations.ts +18 -8
- package/src/modules/dictionaries/commands/factory.ts +2 -8
- package/src/modules/dictionaries/fields/dictionary.tsx +32 -55
- package/src/modules/dictionaries/i18n/de.json +0 -2
- package/src/modules/dictionaries/i18n/en.json +0 -2
- package/src/modules/dictionaries/i18n/es.json +0 -2
- package/src/modules/dictionaries/i18n/pl.json +0 -2
- package/src/modules/directory/utils/organizationScope.ts +2 -36
- package/src/modules/entities/api/records.ts +7 -5
- package/src/modules/entities/backend/entities/system/[entityId]/page.meta.ts +0 -1
- package/src/modules/entities/backend/entities/user/[entityId]/page.meta.ts +0 -1
- package/src/modules/entities/backend/entities/user/[entityId]/page.tsx +49 -51
- package/src/modules/entities/cli.ts +1 -2
- package/src/modules/entities/i18n/de.json +0 -34
- package/src/modules/entities/i18n/en.json +0 -34
- package/src/modules/entities/i18n/es.json +0 -34
- package/src/modules/entities/i18n/pl.json +0 -34
- package/src/modules/feature_toggles/api/check/boolean/route.ts +15 -0
- package/src/modules/feature_toggles/defaults.json +0 -8
- package/src/modules/integrations/backend/integrations/[id]/page.tsx +59 -16
- package/src/modules/payment_gateways/data/entities.ts +0 -39
- package/src/modules/payment_gateways/lib/gateway-service.ts +40 -211
- package/src/modules/payment_gateways/migrations/.snapshot-open-mercato.json +0 -236
- package/src/modules/planner/backend/planner/availability-rulesets/[id]/page.tsx +20 -14
- package/src/modules/planner/components/AvailabilityRulesEditor.tsx +34 -16
- package/src/modules/query_index/api/status.ts +8 -2
- package/src/modules/resources/backend/resources/resources/[id]/page.tsx +37 -27
- package/src/modules/sales/backend/sales/channels/create/page.meta.ts +0 -3
- package/src/modules/sales/backend/sales/channels/create/page.tsx +0 -7
- package/src/modules/sales/backend/sales/channels/offers/page.meta.ts +0 -3
- package/src/modules/sales/backend/sales/channels/offers/page.tsx +0 -7
- package/src/modules/sales/backend/sales/channels/page.meta.ts +0 -4
- package/src/modules/sales/backend/sales/channels/page.tsx +0 -7
- package/src/modules/sales/backend/sales/documents/[id]/page.tsx +5 -7
- package/src/modules/sales/commands/documents.ts +0 -65
- package/src/modules/sales/commands/returns.ts +32 -2
- package/src/modules/sales/components/documents/AddressesSection.tsx +2 -6
- package/src/modules/sales/components/documents/ItemsSection.tsx +0 -5
- package/src/modules/sales/components/documents/LineItemDialog.tsx +0 -10
- package/src/modules/sales/components/documents/SalesDocumentForm.tsx +3 -53
- package/src/modules/sales/components/documents/SalesDocumentsTable.tsx +8 -10
- package/src/modules/sales/components/documents/ShipmentDialog.tsx +40 -65
- package/src/modules/sales/i18n/de.json +0 -5
- package/src/modules/sales/i18n/en.json +0 -5
- package/src/modules/sales/i18n/es.json +0 -5
- package/src/modules/sales/i18n/pl.json +0 -5
- package/src/modules/sales/lib/shipments/snapshots.ts +0 -30
- package/src/modules/staff/backend/staff/team-members/[id]/page.tsx +34 -25
- package/src/modules/staff/backend/staff/teams/[id]/edit/page.tsx +17 -11
- package/src/modules/staff/lib/timesheets-projects-ui/SavedViewTabs.tsx +28 -11
- package/src/modules/sync_excel/lib/adapters/customers.ts +22 -20
- package/src/modules/sync_excel/lib/parser.ts +0 -245
- package/src/modules/sync_excel/lib/upload-storage.ts +1 -23
- package/src/modules/workflows/frontend/checkout-demo/page.tsx +12 -1
- package/src/modules/workflows/lib/activity-executor.ts +22 -2
- package/src/modules/workflows/lib/find-definition.ts +53 -1
- package/src/modules/workflows/lib/signal-handler.ts +5 -4
- package/src/modules/workflows/lib/step-handler.ts +4 -8
- package/src/modules/workflows/lib/task-handler.ts +2 -4
- package/src/modules/workflows/lib/timer-handler.ts +3 -2
- package/src/modules/workflows/lib/transition-handler.ts +5 -13
- package/src/modules/workflows/lib/workflow-executor.ts +11 -8
- package/src/modules/workflows/migrations/Migration20260715120000.ts +114 -0
- package/src/modules/workflows/migrations/Migration20260716120000.ts +57 -0
- package/src/modules/workflows/workflows.ts +2 -0
- package/dist/generated/entities/gateway_session_initialization/index.js +0 -23
- package/dist/generated/entities/gateway_session_initialization/index.js.map +0 -7
- package/dist/modules/attachments/lib/reconcileOrganization.js +0 -110
- package/dist/modules/attachments/lib/reconcileOrganization.js.map +0 -7
- package/dist/modules/attachments/lib/requestScope.js +0 -10
- package/dist/modules/attachments/lib/requestScope.js.map +0 -7
- package/dist/modules/auth/api/autologin.js +0 -85
- package/dist/modules/auth/api/autologin.js.map +0 -7
- package/dist/modules/auth/lib/autologin.js +0 -19
- package/dist/modules/auth/lib/autologin.js.map +0 -7
- package/dist/modules/customers/components/detail/useDealsAccess.js +0 -16
- package/dist/modules/customers/components/detail/useDealsAccess.js.map +0 -7
- package/dist/modules/payment_gateways/lib/session-idempotency.js +0 -104
- package/dist/modules/payment_gateways/lib/session-idempotency.js.map +0 -7
- package/dist/modules/payment_gateways/migrations/Migration20260709220938_payment_gateways.js +0 -11
- package/dist/modules/payment_gateways/migrations/Migration20260709220938_payment_gateways.js.map +0 -7
- package/dist/modules/sales/components/SalesChannelsDisabledNotice.js +0 -15
- package/dist/modules/sales/components/SalesChannelsDisabledNotice.js.map +0 -7
- package/dist/modules/sales/components/useSalesChannelsEnabled.js +0 -44
- package/dist/modules/sales/components/useSalesChannelsEnabled.js.map +0 -7
- package/dist/modules/sales/lib/salesChannelsToggle.js +0 -18
- package/dist/modules/sales/lib/salesChannelsToggle.js.map +0 -7
- package/dist/modules/sales/lib/salesChannelsToggleId.js +0 -5
- package/dist/modules/sales/lib/salesChannelsToggleId.js.map +0 -7
- package/generated/entities/gateway_session_initialization/index.ts +0 -10
- package/src/modules/attachments/lib/reconcileOrganization.ts +0 -188
- package/src/modules/attachments/lib/requestScope.ts +0 -27
- package/src/modules/auth/api/autologin.ts +0 -100
- package/src/modules/auth/lib/autologin.ts +0 -36
- package/src/modules/customers/components/detail/useDealsAccess.ts +0 -19
- package/src/modules/payment_gateways/lib/session-idempotency.ts +0 -142
- package/src/modules/payment_gateways/migrations/Migration20260709220938_payment_gateways.ts +0 -10
- package/src/modules/sales/components/SalesChannelsDisabledNotice.tsx +0 -21
- package/src/modules/sales/components/useSalesChannelsEnabled.ts +0 -59
- package/src/modules/sales/lib/salesChannelsToggle.ts +0 -26
- package/src/modules/sales/lib/salesChannelsToggleId.ts +0 -1
|
@@ -1199,41 +1199,84 @@ export default function IntegrationDetailPage({ params }: IntegrationDetailPageP
|
|
|
1199
1199
|
</section>
|
|
1200
1200
|
) : null}
|
|
1201
1201
|
|
|
1202
|
-
<Tabs value={activeTab} onValueChange={handleTabChange}
|
|
1203
|
-
<TabsList className="w-full overflow-x-auto">
|
|
1202
|
+
<Tabs value={activeTab} onValueChange={handleTabChange} className="space-y-5">
|
|
1203
|
+
<TabsList className="h-auto w-full justify-start overflow-x-auto rounded-none border-b border-border bg-transparent p-0">
|
|
1204
1204
|
{showCredentialsTab ? (
|
|
1205
|
-
<TabsTrigger
|
|
1206
|
-
|
|
1205
|
+
<TabsTrigger
|
|
1206
|
+
value="credentials"
|
|
1207
|
+
className="mr-8 h-auto rounded-none border-b-2 border-transparent bg-transparent px-0 py-2.5 text-sm font-medium text-muted-foreground shadow-none transition-colors hover:bg-transparent hover:text-foreground aria-selected:border-accent-indigo aria-selected:bg-transparent aria-selected:text-foreground aria-selected:shadow-none last:mr-0"
|
|
1208
|
+
>
|
|
1209
|
+
<span className="inline-flex items-center gap-2">
|
|
1210
|
+
<Key className="h-4 w-4" />
|
|
1211
|
+
<span>{t('integrations.detail.tabs.credentials')}</span>
|
|
1212
|
+
</span>
|
|
1207
1213
|
</TabsTrigger>
|
|
1208
1214
|
) : null}
|
|
1209
1215
|
{leadingInjectedTab ? (
|
|
1210
|
-
<TabsTrigger
|
|
1211
|
-
{leadingInjectedTab.
|
|
1216
|
+
<TabsTrigger
|
|
1217
|
+
value={leadingInjectedTab.id}
|
|
1218
|
+
className="mr-8 h-auto rounded-none border-b-2 border-transparent bg-transparent px-0 py-2.5 text-sm font-medium text-muted-foreground shadow-none transition-colors hover:bg-transparent hover:text-foreground aria-selected:border-accent-indigo aria-selected:bg-transparent aria-selected:text-foreground aria-selected:shadow-none last:mr-0"
|
|
1219
|
+
>
|
|
1220
|
+
<span className="inline-flex items-center gap-2">
|
|
1221
|
+
<Settings className="h-4 w-4" />
|
|
1222
|
+
<span>{leadingInjectedTab.label}</span>
|
|
1223
|
+
</span>
|
|
1212
1224
|
</TabsTrigger>
|
|
1213
1225
|
) : null}
|
|
1214
1226
|
{showVersionTab ? (
|
|
1215
|
-
<TabsTrigger
|
|
1216
|
-
|
|
1227
|
+
<TabsTrigger
|
|
1228
|
+
value="version"
|
|
1229
|
+
className="mr-8 h-auto rounded-none border-b-2 border-transparent bg-transparent px-0 py-2.5 text-sm font-medium text-muted-foreground shadow-none transition-colors hover:bg-transparent hover:text-foreground aria-selected:border-accent-indigo aria-selected:bg-transparent aria-selected:text-foreground aria-selected:shadow-none last:mr-0"
|
|
1230
|
+
>
|
|
1231
|
+
<span className="inline-flex items-center gap-2">
|
|
1232
|
+
<RefreshCw className="h-4 w-4" />
|
|
1233
|
+
<span>{t('integrations.detail.tabs.version')}</span>
|
|
1234
|
+
</span>
|
|
1217
1235
|
</TabsTrigger>
|
|
1218
1236
|
) : null}
|
|
1219
1237
|
{showDataSyncScheduleTab ? (
|
|
1220
|
-
<TabsTrigger
|
|
1221
|
-
|
|
1238
|
+
<TabsTrigger
|
|
1239
|
+
value="data-sync-schedule"
|
|
1240
|
+
className="mr-8 h-auto rounded-none border-b-2 border-transparent bg-transparent px-0 py-2.5 text-sm font-medium text-muted-foreground shadow-none transition-colors hover:bg-transparent hover:text-foreground aria-selected:border-accent-indigo aria-selected:bg-transparent aria-selected:text-foreground aria-selected:shadow-none last:mr-0"
|
|
1241
|
+
>
|
|
1242
|
+
<span className="inline-flex items-center gap-2">
|
|
1243
|
+
<Calendar className="h-4 w-4" />
|
|
1244
|
+
<span>{t('data_sync.integrationTab.title', 'Sync schedules')}</span>
|
|
1245
|
+
</span>
|
|
1222
1246
|
</TabsTrigger>
|
|
1223
1247
|
) : null}
|
|
1224
1248
|
{showHealthTab ? (
|
|
1225
|
-
<TabsTrigger
|
|
1226
|
-
|
|
1249
|
+
<TabsTrigger
|
|
1250
|
+
value="health"
|
|
1251
|
+
className="mr-8 h-auto rounded-none border-b-2 border-transparent bg-transparent px-0 py-2.5 text-sm font-medium text-muted-foreground shadow-none transition-colors hover:bg-transparent hover:text-foreground aria-selected:border-accent-indigo aria-selected:bg-transparent aria-selected:text-foreground aria-selected:shadow-none last:mr-0"
|
|
1252
|
+
>
|
|
1253
|
+
<span className="inline-flex items-center gap-2">
|
|
1254
|
+
<Activity className="h-4 w-4" />
|
|
1255
|
+
<span>{t('integrations.detail.tabs.health')}</span>
|
|
1256
|
+
</span>
|
|
1227
1257
|
</TabsTrigger>
|
|
1228
1258
|
) : null}
|
|
1229
1259
|
{showLogsTab ? (
|
|
1230
|
-
<TabsTrigger
|
|
1231
|
-
|
|
1260
|
+
<TabsTrigger
|
|
1261
|
+
value="logs"
|
|
1262
|
+
className="mr-8 h-auto rounded-none border-b-2 border-transparent bg-transparent px-0 py-2.5 text-sm font-medium text-muted-foreground shadow-none transition-colors hover:bg-transparent hover:text-foreground aria-selected:border-accent-indigo aria-selected:bg-transparent aria-selected:text-foreground aria-selected:shadow-none last:mr-0"
|
|
1263
|
+
>
|
|
1264
|
+
<span className="inline-flex items-center gap-2">
|
|
1265
|
+
<FileText className="h-4 w-4" />
|
|
1266
|
+
<span>{t('integrations.detail.tabs.logs')}</span>
|
|
1267
|
+
</span>
|
|
1232
1268
|
</TabsTrigger>
|
|
1233
1269
|
) : null}
|
|
1234
1270
|
{trailingInjectedTabs.map((tab) => (
|
|
1235
|
-
<TabsTrigger
|
|
1236
|
-
{tab.
|
|
1271
|
+
<TabsTrigger
|
|
1272
|
+
key={tab.id}
|
|
1273
|
+
value={tab.id}
|
|
1274
|
+
className="mr-8 h-auto rounded-none border-b-2 border-transparent bg-transparent px-0 py-2.5 text-sm font-medium text-muted-foreground shadow-none transition-colors hover:bg-transparent hover:text-foreground aria-selected:border-accent-indigo aria-selected:bg-transparent aria-selected:text-foreground aria-selected:shadow-none last:mr-0"
|
|
1275
|
+
>
|
|
1276
|
+
<span className="inline-flex items-center gap-2">
|
|
1277
|
+
<Settings className="h-4 w-4" />
|
|
1278
|
+
<span>{tab.label}</span>
|
|
1279
|
+
</span>
|
|
1237
1280
|
</TabsTrigger>
|
|
1238
1281
|
))}
|
|
1239
1282
|
</TabsList>
|
|
@@ -75,45 +75,6 @@ export class GatewayTransaction {
|
|
|
75
75
|
deletedAt?: Date | null
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
@Entity({ tableName: 'gateway_session_initializations' })
|
|
79
|
-
@Unique({
|
|
80
|
-
name: 'gateway_session_initializations_scope_operation_unique',
|
|
81
|
-
properties: ['operationKey', 'providerKey', 'organizationId', 'tenantId'],
|
|
82
|
-
})
|
|
83
|
-
export class GatewaySessionInitialization {
|
|
84
|
-
[OptionalProps]?: 'claimToken' | 'claimedAt' | 'gatewayTransactionId' | 'createdAt' | 'updatedAt'
|
|
85
|
-
|
|
86
|
-
@PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })
|
|
87
|
-
id!: string
|
|
88
|
-
|
|
89
|
-
@Property({ name: 'operation_key', type: 'text' })
|
|
90
|
-
operationKey!: string
|
|
91
|
-
|
|
92
|
-
@Property({ name: 'provider_key', type: 'text' })
|
|
93
|
-
providerKey!: string
|
|
94
|
-
|
|
95
|
-
@Property({ name: 'claim_token', type: 'uuid', nullable: true })
|
|
96
|
-
claimToken?: string | null
|
|
97
|
-
|
|
98
|
-
@Property({ name: 'claimed_at', type: Date, nullable: true })
|
|
99
|
-
claimedAt?: Date | null
|
|
100
|
-
|
|
101
|
-
@Property({ name: 'gateway_transaction_id', type: 'uuid', nullable: true })
|
|
102
|
-
gatewayTransactionId?: string | null
|
|
103
|
-
|
|
104
|
-
@Property({ name: 'organization_id', type: 'uuid' })
|
|
105
|
-
organizationId!: string
|
|
106
|
-
|
|
107
|
-
@Property({ name: 'tenant_id', type: 'uuid' })
|
|
108
|
-
tenantId!: string
|
|
109
|
-
|
|
110
|
-
@Property({ name: 'created_at', type: Date, onCreate: () => new Date() })
|
|
111
|
-
createdAt: Date = new Date()
|
|
112
|
-
|
|
113
|
-
@Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })
|
|
114
|
-
updatedAt: Date = new Date()
|
|
115
|
-
}
|
|
116
|
-
|
|
117
78
|
@Entity({ tableName: 'gateway_webhook_events' })
|
|
118
79
|
@Unique({
|
|
119
80
|
name: 'gateway_webhook_events_idempotency_unique',
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { randomUUID } from 'node:crypto'
|
|
2
1
|
import type { EntityManager } from '@mikro-orm/postgresql'
|
|
3
2
|
import { findOneWithDecryption, findWithDecryption } from '@open-mercato/shared/lib/encryption/find'
|
|
4
3
|
import {
|
|
@@ -16,21 +15,10 @@ import type { CredentialsService } from '../../integrations/lib/credentials-serv
|
|
|
16
15
|
import type { IntegrationStateService } from '../../integrations/lib/state-service'
|
|
17
16
|
import type { IntegrationLogService } from '../../integrations/lib/log-service'
|
|
18
17
|
import { conflict } from '@open-mercato/shared/lib/crud/errors'
|
|
19
|
-
import {
|
|
18
|
+
import { GatewayTransaction } from '../data/entities'
|
|
20
19
|
import { canApplyManualAction, isValidTransition, type ManualGatewayAction } from './status-machine'
|
|
21
20
|
import { emitPaymentGatewayEvent } from '../events'
|
|
22
21
|
import { readGatewayMetadata, readWebhookLog } from './transaction-fields'
|
|
23
|
-
import {
|
|
24
|
-
buildPaymentSessionOperationKey,
|
|
25
|
-
claimPaymentSessionInitialization,
|
|
26
|
-
findPaymentSessionInitialization,
|
|
27
|
-
reclaimPaymentSessionInitialization,
|
|
28
|
-
refreshPaymentSessionInitialization,
|
|
29
|
-
releasePaymentSessionInitialization,
|
|
30
|
-
} from './session-idempotency'
|
|
31
|
-
|
|
32
|
-
const PAYMENT_SESSION_CLAIM_STALE_MS = 30_000
|
|
33
|
-
const PAYMENT_SESSION_WAIT_INTERVAL_MS = 25
|
|
34
22
|
|
|
35
23
|
function assertManualActionAllowed(action: ManualGatewayAction, transaction: GatewayTransaction): void {
|
|
36
24
|
const current = transaction.unifiedStatus as UnifiedPaymentStatus
|
|
@@ -60,17 +48,11 @@ export interface PaymentGatewayServiceDeps {
|
|
|
60
48
|
integrationCredentialsService: CredentialsService
|
|
61
49
|
integrationStateService?: IntegrationStateService
|
|
62
50
|
integrationLogService?: IntegrationLogService
|
|
63
|
-
sessionClaimOptions?: {
|
|
64
|
-
staleAfterMs?: number
|
|
65
|
-
heartbeatIntervalMs?: number
|
|
66
|
-
pollIntervalMs?: number
|
|
67
|
-
}
|
|
68
51
|
}
|
|
69
52
|
|
|
70
53
|
export interface CreatePaymentSessionInput {
|
|
71
54
|
providerKey: string
|
|
72
55
|
paymentId: string
|
|
73
|
-
idempotencyKey?: string
|
|
74
56
|
orderId?: string
|
|
75
57
|
amount: number
|
|
76
58
|
currencyCode: string
|
|
@@ -87,12 +69,6 @@ export interface CreatePaymentSessionInput {
|
|
|
87
69
|
|
|
88
70
|
export function createPaymentGatewayService(deps: PaymentGatewayServiceDeps) {
|
|
89
71
|
const { em, integrationCredentialsService, integrationLogService } = deps
|
|
90
|
-
const claimStaleAfterMs = Math.max(1, deps.sessionClaimOptions?.staleAfterMs ?? PAYMENT_SESSION_CLAIM_STALE_MS)
|
|
91
|
-
const claimHeartbeatIntervalMs = Math.max(
|
|
92
|
-
1,
|
|
93
|
-
deps.sessionClaimOptions?.heartbeatIntervalMs ?? Math.floor(claimStaleAfterMs / 3),
|
|
94
|
-
)
|
|
95
|
-
const claimPollIntervalMs = Math.max(1, deps.sessionClaimOptions?.pollIntervalMs ?? PAYMENT_SESSION_WAIT_INTERVAL_MS)
|
|
96
72
|
|
|
97
73
|
async function findTransactionOrThrow(
|
|
98
74
|
transactionId: string,
|
|
@@ -176,109 +152,6 @@ export function createPaymentGatewayService(deps: PaymentGatewayServiceDeps) {
|
|
|
176
152
|
return { adapter, credentials }
|
|
177
153
|
}
|
|
178
154
|
|
|
179
|
-
function createGatewayTransaction(
|
|
180
|
-
manager: EntityManager,
|
|
181
|
-
input: CreatePaymentSessionInput,
|
|
182
|
-
session: CreateSessionResult,
|
|
183
|
-
id?: string,
|
|
184
|
-
): GatewayTransaction {
|
|
185
|
-
const data = {
|
|
186
|
-
paymentId: input.paymentId,
|
|
187
|
-
providerKey: input.providerKey,
|
|
188
|
-
providerSessionId: session.sessionId,
|
|
189
|
-
unifiedStatus: session.status,
|
|
190
|
-
redirectUrl: session.redirectUrl
|
|
191
|
-
?? (session.clientSession?.type === 'redirect' ? session.clientSession.redirectUrl : null),
|
|
192
|
-
clientSecret: session.clientSecret ?? null,
|
|
193
|
-
amount: String(input.amount),
|
|
194
|
-
currencyCode: input.currencyCode,
|
|
195
|
-
gatewayMetadata: {
|
|
196
|
-
...(session.providerData ?? {}),
|
|
197
|
-
...(session.clientSession ? { clientSession: session.clientSession } : {}),
|
|
198
|
-
},
|
|
199
|
-
organizationId: input.organizationId,
|
|
200
|
-
tenantId: input.tenantId,
|
|
201
|
-
deletedAt: null,
|
|
202
|
-
}
|
|
203
|
-
return id
|
|
204
|
-
? manager.create(GatewayTransaction, { id, ...data })
|
|
205
|
-
: manager.create(GatewayTransaction, data)
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
function restoreSession(transaction: GatewayTransaction): CreateSessionResult {
|
|
209
|
-
const metadata = readGatewayMetadata(transaction.gatewayMetadata)
|
|
210
|
-
const { clientSession, ...providerData } = metadata
|
|
211
|
-
return {
|
|
212
|
-
sessionId: readProviderSessionId(transaction),
|
|
213
|
-
status: transaction.unifiedStatus as UnifiedPaymentStatus,
|
|
214
|
-
...(transaction.clientSecret ? { clientSecret: transaction.clientSecret } : {}),
|
|
215
|
-
...(transaction.redirectUrl ? { redirectUrl: transaction.redirectUrl } : {}),
|
|
216
|
-
...(Object.keys(providerData).length > 0 ? { providerData } : {}),
|
|
217
|
-
...(clientSession && typeof clientSession === 'object'
|
|
218
|
-
? { clientSession: clientSession as CreateSessionResult['clientSession'] }
|
|
219
|
-
: {}),
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
async function recordCreatedSession(
|
|
224
|
-
transaction: GatewayTransaction,
|
|
225
|
-
input: CreatePaymentSessionInput,
|
|
226
|
-
scope: { organizationId: string; tenantId: string },
|
|
227
|
-
): Promise<void> {
|
|
228
|
-
await emitPaymentGatewayEvent('payment_gateways.session.created', {
|
|
229
|
-
transactionId: transaction.id,
|
|
230
|
-
paymentId: transaction.paymentId,
|
|
231
|
-
providerKey: transaction.providerKey,
|
|
232
|
-
status: transaction.unifiedStatus,
|
|
233
|
-
organizationId: transaction.organizationId,
|
|
234
|
-
tenantId: transaction.tenantId,
|
|
235
|
-
})
|
|
236
|
-
await writeTransactionLog(
|
|
237
|
-
transaction.providerKey,
|
|
238
|
-
scope,
|
|
239
|
-
transaction.id,
|
|
240
|
-
'info',
|
|
241
|
-
'Payment session created',
|
|
242
|
-
{
|
|
243
|
-
paymentId: transaction.paymentId,
|
|
244
|
-
providerSessionId: transaction.providerSessionId,
|
|
245
|
-
status: transaction.unifiedStatus,
|
|
246
|
-
amount: input.amount,
|
|
247
|
-
currencyCode: input.currencyCode,
|
|
248
|
-
},
|
|
249
|
-
)
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
function startClaimHeartbeat(
|
|
253
|
-
ownership: { id: string; claimToken: string },
|
|
254
|
-
scope: { organizationId: string; tenantId: string },
|
|
255
|
-
): () => Promise<void> {
|
|
256
|
-
let stopped = false
|
|
257
|
-
let timer: ReturnType<typeof setTimeout> | null = null
|
|
258
|
-
let pendingRefresh = Promise.resolve()
|
|
259
|
-
|
|
260
|
-
const schedule = () => {
|
|
261
|
-
timer = setTimeout(() => {
|
|
262
|
-
pendingRefresh = refreshPaymentSessionInitialization(em, ownership, scope, new Date())
|
|
263
|
-
.then(
|
|
264
|
-
(refreshed) => {
|
|
265
|
-
if (refreshed && !stopped) schedule()
|
|
266
|
-
},
|
|
267
|
-
() => {
|
|
268
|
-
if (!stopped) schedule()
|
|
269
|
-
},
|
|
270
|
-
)
|
|
271
|
-
}, claimHeartbeatIntervalMs)
|
|
272
|
-
}
|
|
273
|
-
schedule()
|
|
274
|
-
|
|
275
|
-
return async () => {
|
|
276
|
-
stopped = true
|
|
277
|
-
if (timer) clearTimeout(timer)
|
|
278
|
-
await pendingRefresh
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
|
|
282
155
|
return {
|
|
283
156
|
async createPaymentSession(input: CreatePaymentSessionInput): Promise<{ transaction: GatewayTransaction; session: CreateSessionResult }> {
|
|
284
157
|
const scope = { organizationId: input.organizationId, tenantId: input.tenantId }
|
|
@@ -287,7 +160,6 @@ export function createPaymentGatewayService(deps: PaymentGatewayServiceDeps) {
|
|
|
287
160
|
const sessionInput: CreateSessionInput = {
|
|
288
161
|
paymentId: input.paymentId,
|
|
289
162
|
orderId: input.orderId,
|
|
290
|
-
idempotencyKey: input.idempotencyKey,
|
|
291
163
|
tenantId: input.tenantId,
|
|
292
164
|
organizationId: input.organizationId,
|
|
293
165
|
amount: input.amount,
|
|
@@ -302,93 +174,50 @@ export function createPaymentGatewayService(deps: PaymentGatewayServiceDeps) {
|
|
|
302
174
|
credentials,
|
|
303
175
|
}
|
|
304
176
|
|
|
305
|
-
|
|
306
|
-
const session = await adapter.createSession(sessionInput)
|
|
307
|
-
const transaction = createGatewayTransaction(em, input, session)
|
|
308
|
-
await em.persist(transaction).flush()
|
|
309
|
-
await recordCreatedSession(transaction, input, scope)
|
|
310
|
-
return { transaction, session }
|
|
311
|
-
}
|
|
177
|
+
const session = await adapter.createSession(sessionInput)
|
|
312
178
|
|
|
313
|
-
const
|
|
314
|
-
idempotencyKey: input.idempotencyKey,
|
|
179
|
+
const transaction = em.create(GatewayTransaction, {
|
|
315
180
|
paymentId: input.paymentId,
|
|
316
181
|
providerKey: input.providerKey,
|
|
317
|
-
|
|
182
|
+
providerSessionId: session.sessionId,
|
|
183
|
+
unifiedStatus: session.status,
|
|
184
|
+
redirectUrl: session.redirectUrl
|
|
185
|
+
?? (session.clientSession?.type === 'redirect' ? session.clientSession.redirectUrl : null),
|
|
186
|
+
clientSecret: session.clientSecret ?? null,
|
|
187
|
+
amount: String(input.amount),
|
|
188
|
+
currencyCode: input.currencyCode,
|
|
189
|
+
gatewayMetadata: {
|
|
190
|
+
...(session.providerData ?? {}),
|
|
191
|
+
...(session.clientSession ? { clientSession: session.clientSession } : {}),
|
|
192
|
+
},
|
|
193
|
+
organizationId: input.organizationId,
|
|
194
|
+
tenantId: input.tenantId,
|
|
318
195
|
})
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
const ownership = existing
|
|
343
|
-
? await reclaimPaymentSessionInitialization(em, existing, scope, claimedAt, staleBefore)
|
|
344
|
-
: await claimPaymentSessionInitialization(em, operationKey, input.providerKey, scope, claimedAt)
|
|
345
|
-
|
|
346
|
-
if (!ownership) {
|
|
347
|
-
await new Promise((resolve) => setTimeout(resolve, claimPollIntervalMs))
|
|
348
|
-
continue
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
let session: CreateSessionResult
|
|
352
|
-
const stopHeartbeat = startClaimHeartbeat(ownership, scope)
|
|
353
|
-
try {
|
|
354
|
-
session = await adapter.createSession({ ...sessionInput, idempotencyKey: operationKey })
|
|
355
|
-
} catch (error) {
|
|
356
|
-
await releasePaymentSessionInitialization(em, ownership, scope).catch(() => undefined)
|
|
357
|
-
throw error
|
|
358
|
-
} finally {
|
|
359
|
-
await stopHeartbeat()
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
const transactionId = randomUUID()
|
|
363
|
-
const transaction = await em.fork().transactional(async (transactionEm) => {
|
|
364
|
-
const finalizedRows = await transactionEm.nativeUpdate(
|
|
365
|
-
GatewaySessionInitialization,
|
|
366
|
-
{
|
|
367
|
-
id: ownership.id,
|
|
368
|
-
claimToken: ownership.claimToken,
|
|
369
|
-
gatewayTransactionId: null,
|
|
370
|
-
organizationId: scope.organizationId,
|
|
371
|
-
tenantId: scope.tenantId,
|
|
372
|
-
},
|
|
373
|
-
{
|
|
374
|
-
gatewayTransactionId: transactionId,
|
|
375
|
-
claimToken: null,
|
|
376
|
-
claimedAt: null,
|
|
377
|
-
updatedAt: new Date(),
|
|
378
|
-
},
|
|
379
|
-
)
|
|
380
|
-
if (finalizedRows === 0) return null
|
|
381
|
-
const created = createGatewayTransaction(transactionEm, input, session, transactionId)
|
|
382
|
-
await transactionEm.persist(created).flush()
|
|
383
|
-
return created
|
|
384
|
-
})
|
|
196
|
+
await em.persist(transaction).flush()
|
|
197
|
+
await emitPaymentGatewayEvent('payment_gateways.session.created', {
|
|
198
|
+
transactionId: transaction.id,
|
|
199
|
+
paymentId: transaction.paymentId,
|
|
200
|
+
providerKey: transaction.providerKey,
|
|
201
|
+
status: transaction.unifiedStatus,
|
|
202
|
+
organizationId: transaction.organizationId,
|
|
203
|
+
tenantId: transaction.tenantId,
|
|
204
|
+
})
|
|
205
|
+
await writeTransactionLog(
|
|
206
|
+
transaction.providerKey,
|
|
207
|
+
scope,
|
|
208
|
+
transaction.id,
|
|
209
|
+
'info',
|
|
210
|
+
'Payment session created',
|
|
211
|
+
{
|
|
212
|
+
paymentId: transaction.paymentId,
|
|
213
|
+
providerSessionId: transaction.providerSessionId,
|
|
214
|
+
status: transaction.unifiedStatus,
|
|
215
|
+
amount: input.amount,
|
|
216
|
+
currencyCode: input.currencyCode,
|
|
217
|
+
},
|
|
218
|
+
)
|
|
385
219
|
|
|
386
|
-
|
|
387
|
-
continue
|
|
388
|
-
}
|
|
389
|
-
await recordCreatedSession(transaction, input, scope)
|
|
390
|
-
return { transaction, session }
|
|
391
|
-
}
|
|
220
|
+
return { transaction, session }
|
|
392
221
|
},
|
|
393
222
|
|
|
394
223
|
async capturePayment(transactionId: string, amount: number | undefined, scope: { organizationId: string; tenantId: string }): Promise<CaptureResult> {
|