@owlmeans/server-payment 0.1.20-rc.1 → 0.2.0-alpha.0
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/README.md +52 -54
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/server-payment/SKILL.md +272 -330
- package/agent-meta/skills/server-payment/parts/reference.md +3 -3
- package/build/access/types.d.ts +7 -16
- package/build/access/types.d.ts.map +1 -1
- package/build/access.d.ts.map +1 -1
- package/build/access.js +6 -8
- package/build/access.js.map +1 -1
- package/build/actions/resync.d.ts +3 -3
- package/build/actions/resync.js +5 -5
- package/build/actions/resync.js.map +1 -1
- package/build/actions/webhook.d.ts +4 -1
- package/build/actions/webhook.d.ts.map +1 -1
- package/build/actions/webhook.js +8 -4
- package/build/actions/webhook.js.map +1 -1
- package/build/bootstrap/types.d.ts +13 -7
- package/build/bootstrap/types.d.ts.map +1 -1
- package/build/bootstrap.d.ts +4 -4
- package/build/bootstrap.d.ts.map +1 -1
- package/build/bootstrap.js +19 -10
- package/build/bootstrap.js.map +1 -1
- package/build/catalogue/types.d.ts +3 -3
- package/build/catalogue/types.d.ts.map +1 -1
- package/build/catalogue.d.ts.map +1 -1
- package/build/catalogue.js +4 -8
- package/build/catalogue.js.map +1 -1
- package/build/checkout/types.d.ts +21 -0
- package/build/checkout/types.d.ts.map +1 -0
- package/build/{plugins/stripe → checkout}/types.js.map +1 -1
- package/build/checkout.d.ts +6 -0
- package/build/checkout.d.ts.map +1 -0
- package/build/checkout.js +374 -0
- package/build/checkout.js.map +1 -0
- package/build/config.d.ts +10 -16
- package/build/config.d.ts.map +1 -1
- package/build/config.js +18 -59
- package/build/config.js.map +1 -1
- package/build/consts.d.ts +3 -49
- package/build/consts.d.ts.map +1 -1
- package/build/consts.js +3 -61
- package/build/consts.js.map +1 -1
- package/build/consumer/cancellation/types.d.ts +6 -4
- package/build/consumer/cancellation/types.d.ts.map +1 -1
- package/build/consumer/cancellation.d.ts.map +1 -1
- package/build/consumer/cancellation.js +11 -5
- package/build/consumer/cancellation.js.map +1 -1
- package/build/consumer/capture/types.d.ts +8 -12
- package/build/consumer/capture/types.d.ts.map +1 -1
- package/build/consumer/capture.d.ts.map +1 -1
- package/build/consumer/capture.js +48 -53
- package/build/consumer/capture.js.map +1 -1
- package/build/consumer/index.d.ts +4 -0
- package/build/consumer/index.d.ts.map +1 -1
- package/build/consumer/index.js +2 -0
- package/build/consumer/index.js.map +1 -1
- package/build/consumer/reconcile.d.ts.map +1 -1
- package/build/consumer/reconcile.js +82 -72
- package/build/consumer/reconcile.js.map +1 -1
- package/build/consumer/records/types.d.ts +4 -4
- package/build/consumer/records/types.d.ts.map +1 -1
- package/build/consumer/records.d.ts.map +1 -1
- package/build/consumer/records.js +16 -13
- package/build/consumer/records.js.map +1 -1
- package/build/consumer/service.d.ts +2 -2
- package/build/consumer/service.d.ts.map +1 -1
- package/build/consumer/service.js +28 -21
- package/build/consumer/service.js.map +1 -1
- package/build/consumer/types.d.ts +1 -4
- package/build/consumer/types.d.ts.map +1 -1
- package/build/consumer/types.local.d.ts +1 -9
- package/build/consumer/types.local.d.ts.map +1 -1
- package/build/consumer/withdrawal/types.d.ts +14 -12
- package/build/consumer/withdrawal/types.d.ts.map +1 -1
- package/build/consumer/withdrawal.d.ts.map +1 -1
- package/build/consumer/withdrawal.js +55 -71
- package/build/consumer/withdrawal.js.map +1 -1
- package/build/index.d.ts +12 -6
- package/build/index.d.ts.map +1 -1
- package/build/index.js +7 -4
- package/build/index.js.map +1 -1
- package/build/paygate/providers.d.ts +13 -0
- package/build/paygate/providers.d.ts.map +1 -0
- package/build/paygate/providers.js +38 -0
- package/build/paygate/providers.js.map +1 -0
- package/build/paygate/registry.d.ts +6 -0
- package/build/paygate/registry.d.ts.map +1 -0
- package/build/paygate/registry.js +37 -0
- package/build/paygate/registry.js.map +1 -0
- package/build/paygate/types.d.ts +577 -0
- package/build/paygate/types.d.ts.map +1 -0
- package/build/{plugins/session → paygate}/types.js.map +1 -1
- package/build/plan/types.d.ts +6 -1
- package/build/plan/types.d.ts.map +1 -1
- package/build/plan.d.ts.map +1 -1
- package/build/plan.js +16 -2
- package/build/plan.js.map +1 -1
- package/build/plugins/checkout-policy/types.d.ts +5 -3
- package/build/plugins/checkout-policy/types.d.ts.map +1 -1
- package/build/plugins/checkout-policy.d.ts.map +1 -1
- package/build/plugins/checkout-policy.js +5 -3
- package/build/plugins/checkout-policy.js.map +1 -1
- package/build/plugins/consts.local.d.ts +8 -10
- package/build/plugins/consts.local.d.ts.map +1 -1
- package/build/plugins/consts.local.js +2 -19
- package/build/plugins/consts.local.js.map +1 -1
- package/build/plugins/customer-lock/types.d.ts +2 -2
- package/build/plugins/customer-lock/types.d.ts.map +1 -1
- package/build/plugins/customer-lock.js +2 -2
- package/build/plugins/customer-lock.js.map +1 -1
- package/build/plugins/estimate/cache.js +1 -1
- package/build/plugins/estimate/cache.js.map +1 -1
- package/build/plugins/estimate/types.d.ts +10 -10
- package/build/plugins/estimate/types.d.ts.map +1 -1
- package/build/plugins/estimate.d.ts.map +1 -1
- package/build/plugins/estimate.js +48 -122
- package/build/plugins/estimate.js.map +1 -1
- package/build/plugins/events/types.d.ts +17 -10
- package/build/plugins/events/types.d.ts.map +1 -1
- package/build/plugins/events.d.ts +6 -5
- package/build/plugins/events.d.ts.map +1 -1
- package/build/plugins/events.js +162 -173
- package/build/plugins/events.js.map +1 -1
- package/build/plugins/fx/types.d.ts +10 -21
- package/build/plugins/fx/types.d.ts.map +1 -1
- package/build/plugins/fx.d.ts +1 -1
- package/build/plugins/fx.d.ts.map +1 -1
- package/build/plugins/fx.js +17 -54
- package/build/plugins/fx.js.map +1 -1
- package/build/plugins/portal/types.d.ts +8 -37
- package/build/plugins/portal/types.d.ts.map +1 -1
- package/build/plugins/portal.d.ts.map +1 -1
- package/build/plugins/portal.js +38 -208
- package/build/plugins/portal.js.map +1 -1
- package/build/plugins/refunds/types.d.ts +11 -11
- package/build/plugins/refunds/types.d.ts.map +1 -1
- package/build/plugins/refunds.d.ts.map +1 -1
- package/build/plugins/refunds.js +14 -39
- package/build/plugins/refunds.js.map +1 -1
- package/build/plugins/snapshot/types.d.ts +11 -0
- package/build/plugins/snapshot/types.d.ts.map +1 -0
- package/build/plugins/snapshot/types.js +2 -0
- package/build/plugins/snapshot/types.js.map +1 -0
- package/build/plugins/snapshot.d.ts +4 -0
- package/build/plugins/snapshot.d.ts.map +1 -0
- package/build/plugins/snapshot.js +19 -0
- package/build/plugins/snapshot.js.map +1 -0
- package/build/plugins/subscriptions/types.d.ts +17 -17
- package/build/plugins/subscriptions/types.d.ts.map +1 -1
- package/build/plugins/subscriptions.d.ts +4 -4
- package/build/plugins/subscriptions.d.ts.map +1 -1
- package/build/plugins/subscriptions.js +69 -77
- package/build/plugins/subscriptions.js.map +1 -1
- package/build/plugins/types.local.d.ts +9 -43
- package/build/plugins/types.local.d.ts.map +1 -1
- package/build/plugins/webhook-manager/types.d.ts +15 -43
- package/build/plugins/webhook-manager/types.d.ts.map +1 -1
- package/build/plugins/webhook-manager.d.ts +3 -3
- package/build/plugins/webhook-manager.d.ts.map +1 -1
- package/build/plugins/webhook-manager.js +21 -199
- package/build/plugins/webhook-manager.js.map +1 -1
- package/build/protocol.d.ts +1 -1
- package/build/protocol.d.ts.map +1 -1
- package/build/protocol.js +1 -1
- package/build/protocol.js.map +1 -1
- package/build/service.d.ts +11 -11
- package/build/service.d.ts.map +1 -1
- package/build/service.js +59 -23
- package/build/service.js.map +1 -1
- package/build/sync/types.d.ts +17 -13
- package/build/sync/types.d.ts.map +1 -1
- package/build/sync.d.ts.map +1 -1
- package/build/sync.js +22 -122
- package/build/sync.js.map +1 -1
- package/build/types.d.ts +46 -101
- package/build/types.d.ts.map +1 -1
- package/build/utils/types.d.ts +0 -8
- package/build/utils/types.d.ts.map +1 -1
- package/build/utils.d.ts +1 -4
- package/build/utils.d.ts.map +1 -1
- package/build/utils.js +1 -15
- package/build/utils.js.map +1 -1
- package/package.json +20 -22
- package/src/access/types.ts +7 -16
- package/src/access.ts +7 -15
- package/src/actions/resync.ts +5 -5
- package/src/actions/webhook.ts +8 -4
- package/src/bootstrap/types.ts +13 -7
- package/src/bootstrap.ts +23 -13
- package/src/catalogue/types.ts +3 -3
- package/src/catalogue.ts +4 -8
- package/src/checkout/types.ts +21 -0
- package/src/checkout.ts +414 -0
- package/src/config.ts +19 -66
- package/src/consts.ts +3 -69
- package/src/consumer/cancellation/types.ts +6 -4
- package/src/consumer/cancellation.ts +13 -7
- package/src/consumer/capture/types.ts +8 -12
- package/src/consumer/capture.ts +50 -59
- package/src/consumer/index.ts +4 -0
- package/src/consumer/reconcile.ts +69 -68
- package/src/consumer/records/types.ts +4 -4
- package/src/consumer/records.ts +19 -14
- package/src/consumer/service.ts +35 -22
- package/src/consumer/types.local.ts +1 -8
- package/src/consumer/types.ts +1 -4
- package/src/consumer/withdrawal/types.ts +14 -12
- package/src/consumer/withdrawal.ts +61 -77
- package/src/index.ts +12 -6
- package/src/paygate/providers.ts +48 -0
- package/src/paygate/registry.ts +53 -0
- package/src/paygate/types.ts +640 -0
- package/src/plan/types.ts +6 -1
- package/src/plan.ts +21 -3
- package/src/plugins/checkout-policy/types.ts +5 -3
- package/src/plugins/checkout-policy.ts +6 -5
- package/src/plugins/consts.local.ts +2 -26
- package/src/plugins/customer-lock/types.ts +2 -2
- package/src/plugins/customer-lock.ts +2 -2
- package/src/plugins/estimate/cache.ts +1 -1
- package/src/plugins/estimate/types.ts +10 -10
- package/src/plugins/estimate.ts +52 -128
- package/src/plugins/events/types.ts +17 -9
- package/src/plugins/events.ts +172 -190
- package/src/plugins/fx/types.ts +10 -23
- package/src/plugins/fx.ts +28 -64
- package/src/plugins/portal/types.ts +8 -38
- package/src/plugins/portal.ts +48 -229
- package/src/plugins/refunds/types.ts +11 -11
- package/src/plugins/refunds.ts +16 -40
- package/src/plugins/snapshot/types.ts +11 -0
- package/src/plugins/snapshot.ts +22 -0
- package/src/plugins/subscriptions/types.ts +17 -17
- package/src/plugins/subscriptions.ts +81 -81
- package/src/plugins/types.local.ts +9 -33
- package/src/plugins/webhook-manager/types.ts +15 -43
- package/src/plugins/webhook-manager.ts +24 -220
- package/src/protocol.ts +1 -1
- package/src/service.ts +66 -30
- package/src/sync/types.ts +17 -13
- package/src/sync.ts +25 -143
- package/src/types.ts +47 -97
- package/src/utils/types.ts +0 -9
- package/src/utils.ts +2 -20
- package/tests/capabilities.spec.ts +219 -0
- package/tests/entitlement.spec.ts +4 -4
- package/tests/gate-handlers.spec.ts +6 -6
- package/tests/gate.spec.ts +2 -2
- package/tests/grants.spec.ts +2 -2
- package/tests/internal-plan.spec.ts +2 -2
- package/tests/limit-gate.spec.ts +2 -2
- package/tests/paygates.spec.ts +132 -0
- package/tests/protocol.spec.ts +4 -5
- package/tests/usage.spec.ts +2 -2
- package/tests/webhook.spec.ts +137 -0
- package/build/plugins/session/types.d.ts +0 -34
- package/build/plugins/session/types.d.ts.map +0 -1
- package/build/plugins/session.d.ts +0 -4
- package/build/plugins/session.d.ts.map +0 -1
- package/build/plugins/session.js +0 -71
- package/build/plugins/session.js.map +0 -1
- package/build/plugins/status.d.ts +0 -8
- package/build/plugins/status.d.ts.map +0 -1
- package/build/plugins/status.js +0 -21
- package/build/plugins/status.js.map +0 -1
- package/build/plugins/stripe/types.d.ts +0 -20
- package/build/plugins/stripe/types.d.ts.map +0 -1
- package/build/plugins/stripe.d.ts +0 -6
- package/build/plugins/stripe.d.ts.map +0 -1
- package/build/plugins/stripe.js +0 -518
- package/build/plugins/stripe.js.map +0 -1
- package/src/plugins/session/types.ts +0 -30
- package/src/plugins/session.ts +0 -86
- package/src/plugins/status.ts +0 -22
- package/src/plugins/stripe/types.ts +0 -20
- package/src/plugins/stripe.ts +0 -571
- package/tests/checkout-consumer.spec.ts +0 -366
- package/tests/checkout-locks.spec.ts +0 -161
- package/tests/checkout-plugins.spec.ts +0 -164
- package/tests/checkout.spec.ts +0 -313
- package/tests/consumer-events.spec.ts +0 -215
- package/tests/consumer-fixtures.ts +0 -141
- package/tests/consumer-ops.spec.ts +0 -361
- package/tests/consumer-rights.integration.spec.ts +0 -147
- package/tests/consumer-rights.spec.ts +0 -606
- package/tests/context.ts +0 -110
- package/tests/estimate.spec.ts +0 -350
- package/tests/events.spec.ts +0 -367
- package/tests/fake-stripe.ts +0 -1004
- package/tests/gateway-options.spec.ts +0 -180
- package/tests/portal.spec.ts +0 -202
- package/tests/sync.spec.ts +0 -114
- package/tests/usage.integration.spec.ts +0 -165
- package/tests/webhook-manager.spec.ts +0 -149
- /package/build/{plugins/session → checkout}/types.js +0 -0
- /package/build/{plugins/stripe → paygate}/types.js +0 -0
package/build/consts.d.ts
CHANGED
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
import { INTERNAL_PAYGATE, LIMIT_GATE } from '@owlmeans/payment';
|
|
2
2
|
export { INTERNAL_PAYGATE, LIMIT_GATE };
|
|
3
|
-
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const STRIPE_PORTAL_PLUGIN_CONFIG = "_external:stripe-portal";
|
|
6
|
-
/** Stripe-only pricing settings (FX Quotes API version, the unspecified-price migration switch) — never advertised to the browser, unlike the `PricingPolicy` record itself. */
|
|
7
|
-
export declare const STRIPE_PRICING_PLUGIN_CONFIG = "_external:stripe-pricing";
|
|
8
|
-
export declare const STRIPE_SIGNATURE = "Stripe-Signature";
|
|
9
|
-
/**
|
|
10
|
-
* The FX Quotes API is a Stripe PREVIEW endpoint as of this writing: it answers only a
|
|
11
|
-
* `Stripe-Version` header naming a preview version, never the SDK's pinned stable one. Verify this
|
|
12
|
-
* string against https://docs.stripe.com/api/fx_quotes/create before relying on it, and override it
|
|
13
|
-
* with `declarePaymentPricing({ stripe: { fxApiVersion } })` once Stripe moves the API or renames
|
|
14
|
-
* the preview.
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* The Stripe API version every client of this package is pinned to (the one stripe-node 17 defaulted to).
|
|
18
|
-
* Moving it re-creates the stored webhook endpoints with their payload shapes, so it moves together with
|
|
19
|
-
* the readers of `current_period_*`, an invoice's subscription and a credit note's refund.
|
|
20
|
-
*/
|
|
21
|
-
export declare const STRIPE_PINNED_API_VERSION = "2025-02-24.acacia";
|
|
22
|
-
export declare const STRIPE_FX_QUOTES_API_VERSION = "2025-07-30.preview";
|
|
3
|
+
/** The payment providers registered in a context (`ensurePaymentProviders`) — a lazy service. */
|
|
4
|
+
export declare const PAYMENT_PROVIDERS = "payment-providers";
|
|
23
5
|
export declare const GATEWAY_SERVICE = "payment-gateway";
|
|
24
6
|
export declare const PAYMENT_OBSERVER = "payment-observer";
|
|
25
7
|
export declare const ENTITLEMENT_SERVICE = "payment-entitlement";
|
|
@@ -60,41 +42,13 @@ export declare const RES_CONSUMER_EVENT = "payment-consumer-event";
|
|
|
60
42
|
export declare const CONSUMER_RIGHTS_SERVICE = "payment-consumer-rights";
|
|
61
43
|
/** The consumer-rights mail options (trader, sender, archive copies) — never advertised. */
|
|
62
44
|
export declare const CONSUMER_RIGHTS_MAIL_PLUGIN_CONFIG = "_external:payment-consumer-mail";
|
|
63
|
-
/**
|
|
64
|
-
export declare const STRIPE_SESSION_TTL_MIN_SECONDS: number;
|
|
65
|
-
export declare const STRIPE_SESSION_TTL_MAX_SECONDS: number;
|
|
66
|
-
/** How far back `reconcile` looks for completed sessions that have no purchase row. */
|
|
45
|
+
/** How far back `reconcile` looks for completed checkouts that have no purchase row. */
|
|
67
46
|
export declare const PURCHASE_BACKFILL_DAYS = 16;
|
|
68
47
|
/** Top-level domains that never receive mail (RFC 2606 / 6761) — e2e addresses are recorded as skipped. */
|
|
69
48
|
export declare const RESERVED_MAIL_TLDS: readonly string[];
|
|
70
|
-
/** The purchase id prefix of a Stripe purchase: `stripe:<session id>` or `stripe:<subscription id>`. */
|
|
71
|
-
export declare const PURCHASE_ID_PREFIX = "stripe";
|
|
72
49
|
/**
|
|
73
50
|
* The contract reference alphabet: digits and capitals without the look-alikes 0/O, 1/I/L, so a
|
|
74
51
|
* reference read aloud or typed from paper is never ambiguous.
|
|
75
52
|
*/
|
|
76
53
|
export declare const CONTRACT_REF_ALPHABET = "23456789ABCDEFGHJKMNPQRSTUVWXYZ";
|
|
77
|
-
/** Fingerprint sku prefix of a portal configuration: `portal:<owner>` (the gateway's `owner`). */
|
|
78
|
-
export declare const FINGERPRINT_PORTAL = "portal";
|
|
79
|
-
/**
|
|
80
|
-
* The metadata every Stripe object this package creates carries (`{ owlmeans: 'payment', service }`,
|
|
81
|
-
* `service` valued with the gateway's `owner`). It labels the object for an operator; several
|
|
82
|
-
* deployments of one owner share it, so it never decides on its own that an object belongs to this
|
|
83
|
-
* deployment.
|
|
84
|
-
*/
|
|
85
|
-
export declare const STRIPE_OWNER_KEY = "owlmeans";
|
|
86
|
-
export declare const STRIPE_OWNER_VALUE = "payment";
|
|
87
|
-
/**
|
|
88
|
-
* The metadata key naming the ONE deployment a portal configuration belongs to, valued with that
|
|
89
|
-
* deployment's webhook URL (`webhookUrlOf`). Only an exact match lets a deployment adopt a
|
|
90
|
-
* configuration it holds no fingerprint row for.
|
|
91
|
-
*/
|
|
92
|
-
export declare const STRIPE_DEPLOYMENT_KEY = "deployment";
|
|
93
|
-
/**
|
|
94
|
-
* Every Stripe event the managed webhook endpoint subscribes to.
|
|
95
|
-
*
|
|
96
|
-
* `invoice.upcoming` is enabled although nothing handles it (it carries no invoice id and nothing
|
|
97
|
-
* is due), so an application can observe it without a Stripe dashboard change.
|
|
98
|
-
*/
|
|
99
|
-
export declare const WEBHOOK_EVENTS: readonly string[];
|
|
100
54
|
//# sourceMappingURL=consts.d.ts.map
|
package/build/consts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAChE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,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O,MAAM,uBAAuB,4BAA4B,CAAA;AAChE,4FAA4F;AAC5F,eAAO,MAAM,kCAAkC,oCAAoC,CAAA;AAEnF,wFAAwF;AACxF,eAAO,MAAM,sBAAsB,KAAK,CAAA;AAExC,2GAA2G;AAC3G,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAA+D,CAAA;AAE/G;;;GAGG;AACH,eAAO,MAAM,qBAAqB,oCAAoC,CAAA"}
|
package/build/consts.js
CHANGED
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
import { INTERNAL_PAYGATE, LIMIT_GATE } from '@owlmeans/payment';
|
|
2
2
|
export { INTERNAL_PAYGATE, LIMIT_GATE };
|
|
3
|
-
|
|
4
|
-
export const
|
|
5
|
-
export const STRIPE_PORTAL_PLUGIN_CONFIG = '_external:stripe-portal';
|
|
6
|
-
/** Stripe-only pricing settings (FX Quotes API version, the unspecified-price migration switch) — never advertised to the browser, unlike the `PricingPolicy` record itself. */
|
|
7
|
-
export const STRIPE_PRICING_PLUGIN_CONFIG = '_external:stripe-pricing';
|
|
8
|
-
export const STRIPE_SIGNATURE = 'Stripe-Signature';
|
|
9
|
-
/**
|
|
10
|
-
* The FX Quotes API is a Stripe PREVIEW endpoint as of this writing: it answers only a
|
|
11
|
-
* `Stripe-Version` header naming a preview version, never the SDK's pinned stable one. Verify this
|
|
12
|
-
* string against https://docs.stripe.com/api/fx_quotes/create before relying on it, and override it
|
|
13
|
-
* with `declarePaymentPricing({ stripe: { fxApiVersion } })` once Stripe moves the API or renames
|
|
14
|
-
* the preview.
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* The Stripe API version every client of this package is pinned to (the one stripe-node 17 defaulted to).
|
|
18
|
-
* Moving it re-creates the stored webhook endpoints with their payload shapes, so it moves together with
|
|
19
|
-
* the readers of `current_period_*`, an invoice's subscription and a credit note's refund.
|
|
20
|
-
*/
|
|
21
|
-
export const STRIPE_PINNED_API_VERSION = '2025-02-24.acacia';
|
|
22
|
-
export const STRIPE_FX_QUOTES_API_VERSION = '2025-07-30.preview';
|
|
3
|
+
/** The payment providers registered in a context (`ensurePaymentProviders`) — a lazy service. */
|
|
4
|
+
export const PAYMENT_PROVIDERS = 'payment-providers';
|
|
23
5
|
export const GATEWAY_SERVICE = 'payment-gateway';
|
|
24
6
|
export const PAYMENT_OBSERVER = 'payment-observer';
|
|
25
7
|
export const ENTITLEMENT_SERVICE = 'payment-entitlement';
|
|
@@ -62,53 +44,13 @@ export const RES_CONSUMER_EVENT = 'payment-consumer-event';
|
|
|
62
44
|
export const CONSUMER_RIGHTS_SERVICE = 'payment-consumer-rights';
|
|
63
45
|
/** The consumer-rights mail options (trader, sender, archive copies) — never advertised. */
|
|
64
46
|
export const CONSUMER_RIGHTS_MAIL_PLUGIN_CONFIG = '_external:payment-consumer-mail';
|
|
65
|
-
/**
|
|
66
|
-
export const STRIPE_SESSION_TTL_MIN_SECONDS = 30 * 60;
|
|
67
|
-
export const STRIPE_SESSION_TTL_MAX_SECONDS = 24 * 60 * 60;
|
|
68
|
-
/** How far back `reconcile` looks for completed sessions that have no purchase row. */
|
|
47
|
+
/** How far back `reconcile` looks for completed checkouts that have no purchase row. */
|
|
69
48
|
export const PURCHASE_BACKFILL_DAYS = 16;
|
|
70
49
|
/** Top-level domains that never receive mail (RFC 2606 / 6761) — e2e addresses are recorded as skipped. */
|
|
71
50
|
export const RESERVED_MAIL_TLDS = Object.freeze(['test', 'example', 'invalid', 'localhost']);
|
|
72
|
-
/** The purchase id prefix of a Stripe purchase: `stripe:<session id>` or `stripe:<subscription id>`. */
|
|
73
|
-
export const PURCHASE_ID_PREFIX = 'stripe';
|
|
74
51
|
/**
|
|
75
52
|
* The contract reference alphabet: digits and capitals without the look-alikes 0/O, 1/I/L, so a
|
|
76
53
|
* reference read aloud or typed from paper is never ambiguous.
|
|
77
54
|
*/
|
|
78
55
|
export const CONTRACT_REF_ALPHABET = '23456789ABCDEFGHJKMNPQRSTUVWXYZ';
|
|
79
|
-
/** Fingerprint sku prefix of a portal configuration: `portal:<owner>` (the gateway's `owner`). */
|
|
80
|
-
export const FINGERPRINT_PORTAL = 'portal';
|
|
81
|
-
/**
|
|
82
|
-
* The metadata every Stripe object this package creates carries (`{ owlmeans: 'payment', service }`,
|
|
83
|
-
* `service` valued with the gateway's `owner`). It labels the object for an operator; several
|
|
84
|
-
* deployments of one owner share it, so it never decides on its own that an object belongs to this
|
|
85
|
-
* deployment.
|
|
86
|
-
*/
|
|
87
|
-
export const STRIPE_OWNER_KEY = 'owlmeans';
|
|
88
|
-
export const STRIPE_OWNER_VALUE = 'payment';
|
|
89
|
-
/**
|
|
90
|
-
* The metadata key naming the ONE deployment a portal configuration belongs to, valued with that
|
|
91
|
-
* deployment's webhook URL (`webhookUrlOf`). Only an exact match lets a deployment adopt a
|
|
92
|
-
* configuration it holds no fingerprint row for.
|
|
93
|
-
*/
|
|
94
|
-
export const STRIPE_DEPLOYMENT_KEY = 'deployment';
|
|
95
|
-
/**
|
|
96
|
-
* Every Stripe event the managed webhook endpoint subscribes to.
|
|
97
|
-
*
|
|
98
|
-
* `invoice.upcoming` is enabled although nothing handles it (it carries no invoice id and nothing
|
|
99
|
-
* is due), so an application can observe it without a Stripe dashboard change.
|
|
100
|
-
*/
|
|
101
|
-
export const WEBHOOK_EVENTS = Object.freeze([
|
|
102
|
-
'checkout.session.completed', 'checkout.session.async_payment_succeeded',
|
|
103
|
-
'checkout.session.async_payment_failed', 'checkout.session.expired',
|
|
104
|
-
'customer.created', 'customer.updated', 'customer.deleted',
|
|
105
|
-
'customer.subscription.created', 'customer.subscription.updated', 'customer.subscription.deleted',
|
|
106
|
-
'customer.subscription.paused', 'customer.subscription.resumed', 'customer.subscription.trial_will_end',
|
|
107
|
-
'customer.subscription.pending_update_applied', 'customer.subscription.pending_update_expired',
|
|
108
|
-
'invoice.paid', 'invoice.payment_failed', 'invoice.payment_action_required', 'invoice.upcoming',
|
|
109
|
-
'invoice.marked_uncollectible', 'invoice.voided',
|
|
110
|
-
'charge.refunded', 'refund.created', 'refund.updated', 'refund.failed',
|
|
111
|
-
'charge.dispute.created', 'charge.dispute.closed', 'charge.dispute.funds_withdrawn',
|
|
112
|
-
'charge.dispute.funds_reinstated',
|
|
113
|
-
]);
|
|
114
56
|
//# sourceMappingURL=consts.js.map
|
package/build/consts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAChE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,CAAA;AAEvC,
|
|
1
|
+
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAChE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,CAAA;AAEvC,iGAAiG;AACjG,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAA;AACpD,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAA;AAChD,MAAM,CAAC,MAAM,gBAAgB,GAAG,kBAAkB,CAAA;AAClD,MAAM,CAAC,MAAM,mBAAmB,GAAG,qBAAqB,CAAA;AAExD,MAAM,CAAC,MAAM,oBAAoB,GAAG,0BAA0B,CAAA;AAC9D,MAAM,CAAC,MAAM,wBAAwB,GAAG,sBAAsB,CAAA;AAC9D,MAAM,CAAC,MAAM,uBAAuB,GAAG,qBAAqB,CAAA;AAC5D,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAAiB,CAAA;AACpD,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAA;AAChD,MAAM,CAAC,MAAM,yBAAyB,GAAG,uBAAuB,CAAA;AAChE,MAAM,CAAC,MAAM,uBAAuB,GAAG,qBAAqB,CAAA;AAC5D,sGAAsG;AACtG,MA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|
import type { ConsumerDeclarationRecord, PaymentSubscriptionRecord } from '../../types.js';
|
|
2
|
+
import type { Paygate } from '../../paygate/types.js';
|
|
3
3
|
/** The paygate step of a declared cancellation. */
|
|
4
4
|
export interface CancellationHelper {
|
|
5
5
|
/**
|
|
6
|
-
* Schedule an ordinary cancellation at the paygate: at the period
|
|
7
|
-
* at a later boundary (
|
|
6
|
+
* Schedule an ordinary cancellation at the paygate (`subscriptions.scheduleCancel`): at the period
|
|
7
|
+
* end, or at a later boundary (no proration), under the idempotency key
|
|
8
|
+
* `cancellation:<id>:schedule[:<attempt>]`. Recorded as a `cancel-scheduled` event; a paygate
|
|
9
|
+
* without `subscriptions` records a failed one.
|
|
8
10
|
*/
|
|
9
|
-
scheduleCancellation: (
|
|
11
|
+
scheduleCancellation: (paygate: Paygate, declaration: ConsumerDeclarationRecord, row: PaymentSubscriptionRecord, attempt?: number) => Promise<boolean>;
|
|
10
12
|
}
|
|
11
13
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/consumer/cancellation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/consumer/cancellation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAA;AAC1F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAErD,mDAAmD;AACnD,MAAM,WAAW,kBAAkB;IACjC;;;;;OAKG;IACH,oBAAoB,EAAE,CACpB,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,yBAAyB,EAAE,GAAG,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,MAAM,KACvG,OAAO,CAAC,OAAO,CAAC,CAAA;CACtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cancellation.d.ts","sourceRoot":"","sources":["../../src/consumer/cancellation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"cancellation.d.ts","sourceRoot":"","sources":["../../src/consumer/cancellation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAMjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE,eAAO,MAAM,sBAAsB,QAAS,UAAU,KAAG,kBAoCxD,CAAA;AAED,gEAAgE;AAChE,eAAO,MAAM,cAAc,mFAA6C,CAAA"}
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
+
import { PaygateError } from '@owlmeans/payment';
|
|
1
2
|
import { memoHelper } from '@owlmeans/context';
|
|
2
3
|
import { paymentUtils } from '../utils.js';
|
|
3
4
|
import { consumerRecordsOf } from './records.js';
|
|
4
5
|
export const makeCancellationHelper = (ctx) => {
|
|
5
|
-
const scheduleCancellation = async (
|
|
6
|
+
const scheduleCancellation = async (paygate, declaration, row, attempt = 0) => {
|
|
6
7
|
const id = declaration.id;
|
|
7
8
|
const effectiveAt = declaration.effectiveAt != null ? new Date(declaration.effectiveAt) : null;
|
|
8
9
|
const atPeriodEnd = effectiveAt == null || row.periodEnd == null
|
|
9
10
|
|| effectiveAt.getTime() === new Date(row.periodEnd).getTime();
|
|
10
|
-
const details = { comment: `cancellation:${id}` };
|
|
11
11
|
try {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
if (paygate.subscriptions == null) {
|
|
13
|
+
throw new PaygateError(`capability:subscriptions:${paygate.id}`);
|
|
14
|
+
}
|
|
15
|
+
await paygate.subscriptions.scheduleCancel(row.externalId, atPeriodEnd
|
|
16
|
+
? { atPeriodEnd: true }
|
|
17
|
+
: { atPeriodEnd: false, at: effectiveAt }, {
|
|
18
|
+
idempotencyKey: attempt > 0 ? `cancellation:${id}:schedule:${attempt}` : `cancellation:${id}:schedule`,
|
|
19
|
+
comment: `cancellation:${id}`,
|
|
20
|
+
});
|
|
15
21
|
await consumerRecordsOf(ctx).recordEvent({
|
|
16
22
|
recordId: id, recordKind: 'declaration', entityId: row.entityId, action: 'cancel-scheduled', ok: true,
|
|
17
23
|
externalId: row.externalId, detail: JSON.stringify({ atPeriodEnd, effectiveAt: effectiveAt?.toISOString() }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cancellation.js","sourceRoot":"","sources":["../../src/consumer/cancellation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cancellation.js","sourceRoot":"","sources":["../../src/consumer/cancellation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAG9C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAGhD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,GAAe,EAAsB,EAAE;IAC5E,MAAM,oBAAoB,GAAG,KAAK,EAChC,OAAgB,EAAE,WAAsC,EAAE,GAA8B,EAAE,OAAO,GAAW,CAAC,EAC3F,EAAE;QACpB,MAAM,EAAE,GAAG,WAAW,CAAC,EAAY,CAAA;QACnC,MAAM,WAAW,GAAG,WAAW,CAAC,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;QAC9F,MAAM,WAAW,GAAG,WAAW,IAAI,IAAI,IAAI,GAAG,CAAC,SAAS,IAAI,IAAI;eAC3D,WAAW,CAAC,OAAO,EAAE,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,OAAO,EAA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,YAAY,CAAC,SAAS,CAAC,KAAK,CAAC;aACjE,CAAC,CAAA;YAEF,OAAO,KAAK,CAAA;QACd,CAAC;IACH,CAAC,CAAA;IAED,OAAO,EAAE,oBAAoB,EAAE,CAAA;AACjC,CAAC,CAAA;AAED,gEAAgE;AAChE,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type Stripe from 'stripe';
|
|
2
1
|
import type { PaymentSubscriptionRecord, PurchaseRecord } from '../../types.js';
|
|
3
2
|
import type { CapturedPurchase, InvoiceEvidence, SessionEvidence } from '../types.js';
|
|
3
|
+
import type { CheckoutSnapshot, Paygate, PaygateSubscription } from '../../paygate/types.js';
|
|
4
4
|
/** What a one-time checkout or a subscription's first invoice extra-records of its purchase. */
|
|
5
5
|
export interface CapturedPaymentExtra {
|
|
6
6
|
netAmountMinor?: number;
|
|
@@ -11,24 +11,20 @@ export interface CapturedPaymentExtra {
|
|
|
11
11
|
}
|
|
12
12
|
/** Paid checkouts and first invoices of a context, captured as purchases. */
|
|
13
13
|
export interface CaptureHelper {
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
* by the pinned SDK, hence the narrow accessor.
|
|
17
|
-
*/
|
|
18
|
-
sessionEvidenceOf: (session: Stripe.Checkout.Session) => SessionEvidence;
|
|
14
|
+
/** The buyer and totals of a checkout session (the local-currency presentment, the terms acceptance). */
|
|
15
|
+
sessionEvidenceOf: (session: CheckoutSnapshot) => SessionEvidence;
|
|
19
16
|
/**
|
|
20
17
|
* An invoice's evidence, best effort: an unreachable invoice is logged and yields nothing — the
|
|
21
|
-
* withdrawal reads it again when it needs it.
|
|
22
|
-
* API version.
|
|
18
|
+
* withdrawal reads it again when it needs it. A paygate without `payments` yields nothing.
|
|
23
19
|
*/
|
|
24
|
-
invoiceEvidenceOf: (
|
|
20
|
+
invoiceEvidenceOf: (paygate: Paygate | null | undefined, invoiceId: string | undefined) => Promise<InvoiceEvidence>;
|
|
25
21
|
/**
|
|
26
22
|
* A completed, paid ONE-TIME checkout as a purchase — the window and the contract registry. Runs
|
|
27
23
|
* BEFORE the credits are granted: the billing country is locked first (first write wins; another
|
|
28
24
|
* country is a `lock-mismatch` event), then the purchase row is written, then its confirmation is
|
|
29
25
|
* mailed. `null` when no consumer-rights policy is declared.
|
|
30
26
|
*/
|
|
31
|
-
capturePaymentPurchase: (
|
|
27
|
+
capturePaymentPurchase: (paygate: Paygate, session: CheckoutSnapshot, extra?: CapturedPaymentExtra, opts?: {
|
|
32
28
|
mail?: boolean;
|
|
33
29
|
}) => Promise<CapturedPurchase | null>;
|
|
34
30
|
/**
|
|
@@ -37,13 +33,13 @@ export interface CaptureHelper {
|
|
|
37
33
|
* buyer's country and totals are refined when the checkout completes. The start request (when the
|
|
38
34
|
* metadata names one) is the purchase's consent: `servicesStartedAt` and `consentedAt`.
|
|
39
35
|
*/
|
|
40
|
-
captureSubscriptionPurchase: (
|
|
36
|
+
captureSubscriptionPurchase: (paygate: Paygate, subscription: PaygateSubscription, row: PaymentSubscriptionRecord) => Promise<CapturedPurchase | null>;
|
|
41
37
|
/**
|
|
42
38
|
* Refine a subscription purchase with its completed checkout: the buyer's own country (and so the
|
|
43
39
|
* scope and deadline), e-mail, the charged totals, the terms acceptance and the session id; lock
|
|
44
40
|
* the billing country; mail the confirmation once.
|
|
45
41
|
*/
|
|
46
|
-
completeSubscriptionPurchase: (
|
|
42
|
+
completeSubscriptionPurchase: (paygate: Paygate, session: CheckoutSnapshot, purchase: PurchaseRecord, opts?: {
|
|
47
43
|
mail?: boolean;
|
|
48
44
|
}) => Promise<PurchaseRecord>;
|
|
49
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/consumer/capture/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":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E,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,KAC7F,OAAO,CAAC,cAAc,CAAC,CAAA;CAC7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capture.d.ts","sourceRoot":"","sources":["../../src/consumer/capture.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"capture.d.ts","sourceRoot":"","sources":["../../src/consumer/capture.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAWjE,OAAO,KAAK,EAAwB,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAM7E,eAAO,MAAM,iBAAiB,QAAS,UAAU,KAAG,aAmSnD,CAAA;AAED,2DAA2D;AAC3D,eAAO,MAAM,SAAS,8EAAwC,CAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ConsentKind, CONSUMER_RIGHTS_COPY_VERSION, PurchaseKind, consumerRegionHelper, withdrawalDeadlineHelper } from '@owlmeans/payment';
|
|
2
2
|
import { memoHelper } from '@owlmeans/context';
|
|
3
|
-
import { STRIPE_PAYGATE_ALIAS } from '../consts.js';
|
|
4
3
|
import { log } from '../log.js';
|
|
5
4
|
import { paymentAccessOf } from '../access.js';
|
|
6
5
|
import { paymentUtils } from '../utils.js';
|
|
@@ -11,56 +10,53 @@ export const makeCaptureHelper = (ctx) => {
|
|
|
11
10
|
const access = paymentAccessOf(ctx);
|
|
12
11
|
const records = consumerRecordsOf(ctx);
|
|
13
12
|
const sessionEvidenceOf = (session) => {
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const subtotal = session.amount_subtotal ?? 0;
|
|
17
|
-
const tax = session.total_details?.amount_tax ?? 0;
|
|
13
|
+
const subtotal = session.amountSubtotalMinor ?? 0;
|
|
14
|
+
const tax = session.amountTaxMinor ?? 0;
|
|
18
15
|
return paymentUtils.compact({
|
|
19
|
-
country:
|
|
20
|
-
email:
|
|
21
|
-
name:
|
|
22
|
-
business:
|
|
16
|
+
country: session.buyer.country?.toUpperCase() ?? undefined,
|
|
17
|
+
email: session.buyer.email ?? undefined,
|
|
18
|
+
name: session.buyer.name ?? undefined,
|
|
19
|
+
business: session.buyer.business === true ? true : undefined,
|
|
23
20
|
currency: (session.currency ?? '').toLowerCase(),
|
|
24
21
|
subtotalMinor: subtotal,
|
|
25
22
|
taxMinor: tax,
|
|
26
|
-
totalMinor: session.
|
|
27
|
-
presentmentCurrency: presentment?.
|
|
28
|
-
presentmentAmountMinor: presentment?.
|
|
29
|
-
termsAccepted: session.
|
|
30
|
-
: session.consent?.terms_of_service != null ? false : undefined,
|
|
23
|
+
totalMinor: session.amountTotalMinor ?? subtotal + tax,
|
|
24
|
+
presentmentCurrency: session.presentment?.currency?.toLowerCase(),
|
|
25
|
+
presentmentAmountMinor: session.presentment?.amountMinor,
|
|
26
|
+
termsAccepted: session.termsAccepted,
|
|
31
27
|
});
|
|
32
28
|
};
|
|
33
|
-
const invoiceEvidenceOf = async (
|
|
34
|
-
if (
|
|
29
|
+
const invoiceEvidenceOf = async (paygate, invoiceId) => {
|
|
30
|
+
if (paygate?.payments == null || invoiceId == null) {
|
|
35
31
|
return {};
|
|
36
32
|
}
|
|
37
33
|
try {
|
|
38
|
-
const invoice = await
|
|
39
|
-
|
|
34
|
+
const invoice = await paygate.payments.invoice(invoiceId);
|
|
35
|
+
if (invoice == null) {
|
|
36
|
+
return {};
|
|
37
|
+
}
|
|
40
38
|
return paymentUtils.compact({
|
|
41
39
|
invoiceNumber: invoice.number ?? undefined,
|
|
42
|
-
invoiceLineId: invoice.
|
|
43
|
-
paymentIntentId:
|
|
44
|
-
country: invoice.
|
|
45
|
-
subtotalMinor: invoice.
|
|
46
|
-
taxMinor:
|
|
47
|
-
totalMinor: invoice.
|
|
40
|
+
invoiceLineId: invoice.firstLineId,
|
|
41
|
+
paymentIntentId: invoice.paymentId,
|
|
42
|
+
country: invoice.country?.toUpperCase() ?? undefined,
|
|
43
|
+
subtotalMinor: invoice.subtotalMinor ?? undefined,
|
|
44
|
+
taxMinor: invoice.taxMinor ?? undefined,
|
|
45
|
+
totalMinor: invoice.totalMinor ?? undefined,
|
|
48
46
|
currency: invoice.currency ?? undefined,
|
|
49
47
|
});
|
|
50
48
|
}
|
|
51
49
|
catch (error) {
|
|
52
|
-
|
|
53
|
-
log.warn('Invoice unreadable for its purchase', { invoiceId, error });
|
|
54
|
-
}
|
|
50
|
+
log.warn('Invoice unreadable for its purchase', { invoiceId, error });
|
|
55
51
|
return {};
|
|
56
52
|
}
|
|
57
53
|
};
|
|
58
54
|
/**
|
|
59
55
|
* Lock the entity's billing country from a completed checkout, when the policy locks countries: the
|
|
60
|
-
* buyer's address at
|
|
61
|
-
* it (`countryPinned`: tax was calculated on it, the card form's country moved nothing).
|
|
56
|
+
* buyer's address at the paygate, else the declared country — the pinned one first when the session
|
|
57
|
+
* held it (`countryPinned`: tax was calculated on it, the card form's country moved nothing).
|
|
62
58
|
*/
|
|
63
|
-
const lockFromSession = async (policy, entityId, session, evidence) => {
|
|
59
|
+
const lockFromSession = async (paygate, policy, entityId, session, evidence) => {
|
|
64
60
|
const metadata = session.metadata ?? {};
|
|
65
61
|
const country = metadata.countryPinned === 'true'
|
|
66
62
|
? metadata.country ?? evidence.country
|
|
@@ -69,7 +65,7 @@ export const makeCaptureHelper = (ctx) => {
|
|
|
69
65
|
return null;
|
|
70
66
|
}
|
|
71
67
|
const { record } = await records.lockProfile(policy, {
|
|
72
|
-
entityId, country, source: 'checkout', customerId:
|
|
68
|
+
entityId, country, source: 'checkout', paygate: paygate.id, customerId: session.customerId, sessionId: session.id,
|
|
73
69
|
ipCountry: metadata.ipCountry, email: evidence.email, name: evidence.name, business: evidence.business,
|
|
74
70
|
currency: evidence.currency, language: metadata.language,
|
|
75
71
|
});
|
|
@@ -96,7 +92,7 @@ export const makeCaptureHelper = (ctx) => {
|
|
|
96
92
|
}
|
|
97
93
|
await consumerMailOf(ctx).sendConsumerMail(policy, 'purchase', purchase.purchaseId);
|
|
98
94
|
};
|
|
99
|
-
const capturePaymentPurchase = async (
|
|
95
|
+
const capturePaymentPurchase = async (paygate, session, extra = {}, opts = {}) => {
|
|
100
96
|
const policy = await access.payment().consumerRightsPolicy();
|
|
101
97
|
if (policy == null) {
|
|
102
98
|
return null;
|
|
@@ -107,8 +103,8 @@ export const makeCaptureHelper = (ctx) => {
|
|
|
107
103
|
return null;
|
|
108
104
|
}
|
|
109
105
|
const evidence = sessionEvidenceOf(session);
|
|
110
|
-
const profile = await lockFromSession(policy, entityId, session, evidence);
|
|
111
|
-
const existing = await access.purchases().byPurchaseId(records.purchaseIdOf(session.id));
|
|
106
|
+
const profile = await lockFromSession(paygate, policy, entityId, session, evidence);
|
|
107
|
+
const existing = await access.purchases().byPurchaseId(records.purchaseIdOf(paygate.id, session.id));
|
|
112
108
|
if (existing != null) {
|
|
113
109
|
if (opts.mail !== false)
|
|
114
110
|
await confirmPurchase(policy, existing);
|
|
@@ -118,16 +114,16 @@ export const makeCaptureHelper = (ctx) => {
|
|
|
118
114
|
const region = consumerRegionHelper.regionOf(country, policy);
|
|
119
115
|
// Protected when either the buyer's own address or the organization's locked country is in scope.
|
|
120
116
|
const scoped = consumerRegionHelper.inScope(region, country, policy) || (profile != null && consumerRegionHelper.inScope(profile.region, profile.country, policy));
|
|
121
|
-
const invoice = await invoiceEvidenceOf(
|
|
117
|
+
const invoice = await invoiceEvidenceOf(paygate, session.invoiceId);
|
|
122
118
|
const purchasedAt = extra.at ?? new Date();
|
|
123
119
|
const draft = paymentUtils.compact({
|
|
124
|
-
purchaseId: records.purchaseIdOf(session.id),
|
|
120
|
+
purchaseId: records.purchaseIdOf(paygate.id, session.id),
|
|
125
121
|
entityId,
|
|
126
122
|
kind: PurchaseKind.TopUp,
|
|
127
|
-
paygate:
|
|
123
|
+
paygate: paygate.id,
|
|
128
124
|
sessionId: session.id,
|
|
129
|
-
paymentIntentId:
|
|
130
|
-
invoiceId:
|
|
125
|
+
paymentIntentId: session.paymentId ?? invoice.paymentIntentId,
|
|
126
|
+
invoiceId: session.invoiceId,
|
|
131
127
|
invoiceNumber: invoice.invoiceNumber,
|
|
132
128
|
invoiceLineId: invoice.invoiceLineId,
|
|
133
129
|
productSku: metadata.productSku,
|
|
@@ -171,33 +167,32 @@ export const makeCaptureHelper = (ctx) => {
|
|
|
171
167
|
const consent = await access.consumerConsents().load(id).catch(() => null);
|
|
172
168
|
return consent != null && consent.kind === ConsentKind.SubscriptionStart && consent.entityId === entityId ? consent : null;
|
|
173
169
|
};
|
|
174
|
-
const captureSubscriptionPurchase = async (
|
|
170
|
+
const captureSubscriptionPurchase = async (paygate, subscription, row) => {
|
|
175
171
|
const policy = await access.payment().consumerRightsPolicy();
|
|
176
172
|
if (policy == null) {
|
|
177
173
|
return null;
|
|
178
174
|
}
|
|
179
|
-
const purchaseId = records.purchaseIdOf(subscription.id);
|
|
175
|
+
const purchaseId = records.purchaseIdOf(paygate.id, subscription.id);
|
|
180
176
|
const existing = await access.purchases().byPurchaseId(purchaseId);
|
|
181
177
|
if (existing != null) {
|
|
182
178
|
return { purchase: existing, created: false };
|
|
183
179
|
}
|
|
184
180
|
const metadata = subscription.metadata ?? {};
|
|
185
|
-
const
|
|
186
|
-
const
|
|
187
|
-
const invoice = await invoiceEvidenceOf(stripe, invoiceId);
|
|
181
|
+
const invoiceId = subscription.latestInvoiceId;
|
|
182
|
+
const invoice = await invoiceEvidenceOf(paygate, invoiceId);
|
|
188
183
|
const profile = await access.billingProfiles().byEntity(row.entityId);
|
|
189
184
|
const country = invoice.country ?? profile?.country ?? metadata.country;
|
|
190
185
|
const region = consumerRegionHelper.regionOf(country, policy);
|
|
191
186
|
const scoped = consumerRegionHelper.inScope(region, country, policy) || (profile != null && consumerRegionHelper.inScope(profile.region, profile.country, policy));
|
|
192
187
|
const start = await startRequestOf(row.entityId, metadata.startRequestId);
|
|
193
|
-
const subtotal = invoice.subtotalMinor ?? (
|
|
188
|
+
const subtotal = invoice.subtotalMinor ?? (subscription.unitAmountMinor ?? 0) * (subscription.quantity ?? 1);
|
|
194
189
|
const tax = invoice.taxMinor ?? 0;
|
|
195
|
-
const purchasedAt =
|
|
190
|
+
const purchasedAt = subscription.createdAt ?? new Date();
|
|
196
191
|
const draft = paymentUtils.compact({
|
|
197
192
|
purchaseId,
|
|
198
193
|
entityId: row.entityId,
|
|
199
194
|
kind: PurchaseKind.Subscription,
|
|
200
|
-
paygate:
|
|
195
|
+
paygate: paygate.id,
|
|
201
196
|
subscriptionId: subscription.id,
|
|
202
197
|
paymentIntentId: invoice.paymentIntentId,
|
|
203
198
|
invoiceId,
|
|
@@ -211,11 +206,11 @@ export const makeCaptureHelper = (ctx) => {
|
|
|
211
206
|
ipCountry: metadata.ipCountry,
|
|
212
207
|
inScope: scoped,
|
|
213
208
|
language: profile?.language ?? metadata.language ?? consumerRegionHelper.billingLanguageOf(country, policy),
|
|
214
|
-
currency: (invoice.currency ?? subscription.currency ??
|
|
209
|
+
currency: (invoice.currency ?? subscription.currency ?? subscription.priceCurrency ?? 'usd').toLowerCase(),
|
|
215
210
|
amountSubtotalMinor: subtotal,
|
|
216
211
|
amountTaxMinor: tax,
|
|
217
212
|
amountTotalMinor: invoice.totalMinor ?? subtotal + tax,
|
|
218
|
-
taxBehavior:
|
|
213
|
+
taxBehavior: subscription.taxBehavior ?? undefined,
|
|
219
214
|
textVersion: metadata.termsVersion ?? policy.textVersion,
|
|
220
215
|
copyVersion: metadata.copyVersion ?? CONSUMER_RIGHTS_COPY_VERSION,
|
|
221
216
|
startRequestId: start?.id,
|
|
@@ -228,22 +223,22 @@ export const makeCaptureHelper = (ctx) => {
|
|
|
228
223
|
const { record, created } = await records.createPurchase(draft);
|
|
229
224
|
return { purchase: record, created };
|
|
230
225
|
};
|
|
231
|
-
const completeSubscriptionPurchase = async (
|
|
226
|
+
const completeSubscriptionPurchase = async (paygate, session, purchase, opts = {}) => {
|
|
232
227
|
const policy = await access.payment().consumerRightsPolicy();
|
|
233
228
|
if (policy == null) {
|
|
234
229
|
return purchase;
|
|
235
230
|
}
|
|
236
231
|
const evidence = sessionEvidenceOf(session);
|
|
237
|
-
const profile = await lockFromSession(policy, purchase.entityId, session, evidence);
|
|
232
|
+
const profile = await lockFromSession(paygate, policy, purchase.entityId, session, evidence);
|
|
238
233
|
const country = evidence.country ?? purchase.country ?? profile?.country;
|
|
239
234
|
const region = consumerRegionHelper.regionOf(country, policy);
|
|
240
235
|
const scoped = consumerRegionHelper.inScope(region, country, policy) || (profile != null && consumerRegionHelper.inScope(profile.region, profile.country, policy));
|
|
241
236
|
const invoice = purchase.invoiceLineId == null || purchase.paymentIntentId == null
|
|
242
|
-
? await invoiceEvidenceOf(
|
|
237
|
+
? await invoiceEvidenceOf(paygate, purchase.invoiceId ?? session.invoiceId) : {};
|
|
243
238
|
const purchasedAt = new Date(purchase.purchasedAt);
|
|
244
239
|
const fields = paymentUtils.compact({
|
|
245
240
|
sessionId: session.id,
|
|
246
|
-
invoiceId: purchase.invoiceId ??
|
|
241
|
+
invoiceId: purchase.invoiceId ?? session.invoiceId,
|
|
247
242
|
invoiceNumber: purchase.invoiceNumber ?? invoice.invoiceNumber,
|
|
248
243
|
invoiceLineId: purchase.invoiceLineId ?? invoice.invoiceLineId,
|
|
249
244
|
paymentIntentId: purchase.paymentIntentId ?? invoice.paymentIntentId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capture.js","sourceRoot":"","sources":["../../src/consumer/capture.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,4BAA4B,EAAE,YAAY,EAA6B,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AAEtK,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;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