@ambushsoftworks/nestjs-payments-graphql 0.4.0-rc.2 → 0.4.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +187 -1
- package/README.md +25 -1
- package/dist/gateways/payment-gateway.interface.d.ts +1 -0
- package/dist/gateways/stripe/stripe.gateway.d.ts +5 -1
- package/dist/gateways/stripe/stripe.gateway.js +56 -17
- package/dist/gateways/stripe/stripe.gateway.js.map +1 -1
- package/dist/gateways/stripe/types.d.ts +2 -1
- package/dist/gateways/stripe/types.js +4 -2
- package/dist/gateways/stripe/types.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/payments.module.js.map +1 -1
- package/dist/services/payment-email.service.js +1 -3
- package/dist/services/payment-email.service.js.map +1 -1
- package/dist/services/payment.service.js.map +1 -1
- package/dist/services/recurring-invoice.service.d.ts +1 -1
- package/dist/services/recurring-invoice.service.js +1 -1
- package/dist/services/recurring-invoice.service.js.map +1 -1
- package/dist/services/refund.service.d.ts +7 -1
- package/dist/services/refund.service.js +208 -84
- package/dist/services/refund.service.js.map +1 -1
- package/package.json +4 -2
- package/prisma/payment-models.prisma +24 -0
package/CHANGELOG.md
CHANGED
|
@@ -34,7 +34,13 @@ prose for buried obligations. The marker was introduced in v0.4.0 and
|
|
|
34
34
|
> feature with no way to reach it from GraphQL — `CreateRecurringInvoiceInput`,
|
|
35
35
|
> `UpdateRecurringTemplateInput` and `RecurringInvoiceModel` all lacked the
|
|
36
36
|
> field. Fixed in `0.4.0-rc.2`; if you tested against rc.1, that is the
|
|
37
|
-
> difference.
|
|
37
|
+
> difference. `0.4.0-rc.3` fixes a duplicate-refund bug present in both — one
|
|
38
|
+
> refund wrote two `Refund` rows and doubled the invoice's `amountDue`. It
|
|
39
|
+
> carries an external-configuration step; see below. If you tested refunds
|
|
40
|
+
> against rc.1 or rc.2, retest them. `0.4.0-rc.4` fixes a *second*, unrelated
|
|
41
|
+
> duplicate on the same handler — a race between the refund API call and the
|
|
42
|
+
> webhooks it triggers, which produced three rows rather than two. It carries a
|
|
43
|
+
> database migration; see below. Refunds are worth retesting once more.
|
|
38
44
|
|
|
39
45
|
> **Upgrade notes.** Two database changes, both in your own schema:
|
|
40
46
|
>
|
|
@@ -56,12 +62,134 @@ prose for buried obligations. The marker was introduced in v0.4.0 and
|
|
|
56
62
|
> the 0.3.1 notes below before moving traffic onto this — the double-application
|
|
57
63
|
> fix has an audit step attached to it.
|
|
58
64
|
|
|
65
|
+
### ⚠ External configuration required
|
|
66
|
+
|
|
67
|
+
**Subscribe your Stripe webhook endpoint to `refund.created` and `refund.updated`.**
|
|
68
|
+
|
|
69
|
+
They replace `charge.refunded`, which is no longer routed. An endpoint left on
|
|
70
|
+
the old subscription stops recording refunds altogether — no error, no row, and
|
|
71
|
+
an invoice that keeps reporting money it no longer holds.
|
|
72
|
+
|
|
73
|
+
Nothing in your repository can catch this: the subscription lives in the Stripe
|
|
74
|
+
Dashboard. Two things will tell you. `verifyStripeConfiguration` reports the
|
|
75
|
+
missing events as an `error` (and `stripe.verifyOnBoot` runs it at startup),
|
|
76
|
+
and the gateway logs one warning per process if `charge.refunded` still
|
|
77
|
+
arrives. `charge.refunded` can then be removed from the endpoint, or left
|
|
78
|
+
subscribed and ignored.
|
|
79
|
+
|
|
80
|
+
**Add a unique constraint on `Refund(paymentId, providerRefundId)`.**
|
|
81
|
+
|
|
82
|
+
```sql
|
|
83
|
+
CREATE UNIQUE INDEX "Refund_paymentId_providerRefundId_key"
|
|
84
|
+
ON "Refund" ("paymentId", "providerRefundId");
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
This is the guard that makes one provider refund produce exactly one row. Several
|
|
88
|
+
writers converge on that row — the API call that requested the refund, and the
|
|
89
|
+
`refund.created` / `refund.updated` webhooks Stripe emits while that call is
|
|
90
|
+
still in flight — and a read-then-write between them cannot be made safe by
|
|
91
|
+
ordering alone. `RefundService` catches the violation and adopts the existing
|
|
92
|
+
row, so losing the race is normal and silent.
|
|
93
|
+
|
|
94
|
+
NULL never collides in a Postgres unique index, so manual refunds — which
|
|
95
|
+
legitimately have no provider id — are unaffected, and any number of them can
|
|
96
|
+
exist against one payment.
|
|
97
|
+
|
|
98
|
+
**De-duplicate before you add it.** The index will not build if rc.1–rc.3 left
|
|
99
|
+
duplicate rows behind. To find them:
|
|
100
|
+
|
|
101
|
+
```sql
|
|
102
|
+
SELECT "paymentId", "providerRefundId", count(*), array_agg(id)
|
|
103
|
+
FROM "Refund"
|
|
104
|
+
WHERE "providerRefundId" IS NOT NULL
|
|
105
|
+
GROUP BY 1, 2 HAVING count(*) > 1;
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Keep the row carrying a `reason` and a real `createdBy` — that is the one the
|
|
109
|
+
API wrote — and delete the rest. Then recalculate the affected invoices;
|
|
110
|
+
`amountPaid` and `amountDue` will be wrong until you do.
|
|
111
|
+
|
|
59
112
|
### Fixed
|
|
60
113
|
- **Tax rates lost precision at 4 decimal places, systematically over-charging.** `Invoice.taxRate`, `RecurringInvoice.taxRate` and `PaymentConfig.defaultTaxRate` were declared `Decimal(5, 4)` in `prisma/payment-models.prisma`, which cannot hold Quebec's 9.975% QST: `0.09975` stores as `0.0998`. The error is not random — it rounds up, so every affected invoice over-charges by the same margin (5¢ per $1,000). All three are now `Decimal(6, 5)`.
|
|
61
114
|
- **This is a reference-schema fix, not a package-code fix.** `DecimalLike` always handled five decimal places, and `recalculateTotals` has carried a comment about *"rates like 9.975%"* since before the column existed — we anticipated the rate and then shipped a column that could not hold it. Consumers who chose their own column types were never affected.
|
|
62
115
|
- **Migration required if you copied the reference schema.** Widening a numeric scale is non-destructive and no package behaviour changes, but values already truncated on write stay truncated: re-save any tax rate with more than four decimal places after migrating. `ALTER TABLE "Invoice" ALTER COLUMN "taxRate" TYPE numeric(6,5);` and likewise for `RecurringInvoice.taxRate` and `PaymentConfig.defaultTaxRate`.
|
|
63
116
|
- A spec now asserts the precision of every tax-rate column in the reference schema, and that every money column stays `Int`, so a future re-sync cannot narrow them back silently.
|
|
64
117
|
|
|
118
|
+
- **A single refund wrote two `Refund` rows, doubled `amountDue`, and emailed
|
|
119
|
+
the client twice.** Reported by the Ariadne team against `0.4.0-rc.1`,
|
|
120
|
+
reproduced unchanged on `0.4.0-rc.2`.
|
|
121
|
+
|
|
122
|
+
`handleChargeRefunded` read the refund id from `charge.refunds.data[0]`.
|
|
123
|
+
`charge.refunds` is a paginated sub-list that Stripe does not expand in
|
|
124
|
+
webhook payloads, and a webhook cannot request expansion the way an API read
|
|
125
|
+
can — so the id was `undefined` on **every** delivery, not intermittently.
|
|
126
|
+
`handleRefundSucceeded` then looked for an existing refund by that
|
|
127
|
+
`undefined`, found nothing, and created a second record for the refund it had
|
|
128
|
+
just made itself.
|
|
129
|
+
|
|
130
|
+
Refunds are now recorded from `refund.created` / `refund.updated`, where the
|
|
131
|
+
Refund object *is* `event.data.object`, so `id`, `amount` and `status` are
|
|
132
|
+
present as delivered. See the external-configuration note above.
|
|
133
|
+
|
|
134
|
+
- **A second partial refund was recorded at the charge's cumulative refunded
|
|
135
|
+
total rather than its own amount.** `charge.refunded` carried
|
|
136
|
+
`amount_refunded` — a running total — which the create path treated as one
|
|
137
|
+
refund's amount. Masked in the original report because a single full refund
|
|
138
|
+
makes the two figures identical. `refund.amount` is per-refund, so the new
|
|
139
|
+
path does not have the ambiguity.
|
|
140
|
+
|
|
141
|
+
- **Failed refunds were never recorded.** `refund.failed` has been a routable
|
|
142
|
+
event type with a controller branch and a `handleRefundFailed` implementation
|
|
143
|
+
since before v0.4.0, but no Stripe event ever mapped to it, so the handler was
|
|
144
|
+
unreachable. `refund.updated` now supplies it via the refund's `status`. A
|
|
145
|
+
failure that matches no known refund is logged at `warn` instead of being
|
|
146
|
+
silently dropped.
|
|
147
|
+
|
|
148
|
+
- **`amountPaid` and `amountDue` could disagree with `total`.** The two were
|
|
149
|
+
clamped to zero independently, so a negative computed balance stored
|
|
150
|
+
`amountPaid: 0` alongside an unclamped `amountDue` — which is how a $210.00
|
|
151
|
+
invoice came to report $420.00 outstanding with nothing paid. `amountDue` is
|
|
152
|
+
now derived from the stored `amountPaid`, so `amountPaid + amountDue == total`
|
|
153
|
+
holds regardless of what is wrong upstream.
|
|
154
|
+
- **A second duplicate-refund defect, from a race rather than a missing id.**
|
|
155
|
+
Reported by the Ariadne team against `0.4.0-rc.3`: one `createRefund`
|
|
156
|
+
produced **three** rows, all carrying the same `re_…`.
|
|
157
|
+
|
|
158
|
+
`createRefund` held a database transaction open across the call to Stripe.
|
|
159
|
+
Stripe emits `refund.created` the moment the refund exists — about a second
|
|
160
|
+
before the HTTP response is consumed — and neither that webhook nor the
|
|
161
|
+
`refund.updated` behind it could see a row the still-open transaction had not
|
|
162
|
+
committed. Both created their own; the API path then added a third.
|
|
163
|
+
|
|
164
|
+
The dedupe logic was correct and the id was present. The row it looked for
|
|
165
|
+
had not been committed yet.
|
|
166
|
+
|
|
167
|
+
Refunds now converge on `(paymentId, providerRefundId)` through a single
|
|
168
|
+
path, and **the provider is never called with a transaction open** — a
|
|
169
|
+
transaction cannot protect a network call (the refund happens at Stripe
|
|
170
|
+
whether or not we commit), so all it bought was a window where our own writes
|
|
171
|
+
were invisible to us, plus a pooled connection pinned for the provider's full
|
|
172
|
+
latency. A webhook arriving mid-call is no longer a duplicate: it is the
|
|
173
|
+
writer that won, and the API path finishes the row it wrote, backfilling the
|
|
174
|
+
`reason` and actor a webhook cannot know.
|
|
175
|
+
|
|
176
|
+
- **A refund the client was emailed about twice.** `refund.created` and
|
|
177
|
+
`refund.updated` both normalize to `refund.succeeded` for a refund that
|
|
178
|
+
succeeds immediately, so the second event describes a refund already in its
|
|
179
|
+
final state — and the handler re-sent the confirmation email and re-emitted
|
|
180
|
+
`onInvoiceRefunded` on observing that, rather than on causing it. Latent in
|
|
181
|
+
rc.3 and masked by the duplicate rows, since no event ever reached the
|
|
182
|
+
already-succeeded branch. Both are now announced only by the writer that
|
|
183
|
+
actually made the refund terminal.
|
|
184
|
+
|
|
185
|
+
- Three latent type holes the first lint run surfaced, all fixed properly rather
|
|
186
|
+
than suppressed: an unnecessary `error as any` in `StripeGateway` hiding
|
|
187
|
+
`StripeCardError.payment_intent`, which the Stripe SDK types declare; the
|
|
188
|
+
`PaymentService` cast described above; and an untyped `ModuleRef.get` for the
|
|
189
|
+
email template renderer, which meant a consumer's renderer drifting from
|
|
190
|
+
`IPaymentEmailTemplateRenderer` went unchecked at the injection point.
|
|
191
|
+
- Three dead imports (`OnModuleInit`, and `InvoiceLineItem` in two files).
|
|
192
|
+
|
|
65
193
|
### Added
|
|
66
194
|
- **Invoices can carry more than one tax.** `Invoice.taxRate` models a sale attracting exactly one tax, which is all most sales are — and cannot express one attracting two. A Quebec sale carries 5% GST *and* 9.975% QST: two taxes, levied by two governments, remitted separately. Blending them to 14.975% produces an invoice the client cannot claim input tax credits from and the supplier cannot reconcile two remittances against. US state + county + city sales tax stacks the same way. `CreateInvoiceInput.taxComponents` now accepts a list of `{ name, rate, authority?, registrationNumber?, sortOrder? }`, stored as `InvoiceTaxComponent` rows.
|
|
67
195
|
- **Nothing changes for single-rate invoices**, which remain the default and the entire behaviour when `taxComponents` is omitted. `taxRate` keeps working exactly as before, including against repository adapters that never implement the new optional methods.
|
|
@@ -93,9 +221,57 @@ prose for buried obligations. The marker was introduced in v0.4.0 and
|
|
|
93
221
|
- **`stripe.webhookUrl?: string`** — the public URL of this app's webhook endpoint, used *only* by `verifyOnBoot`. The package does not route on it; the controller still mounts at the fixed path `POST /webhooks/stripe`. Without it, boot verification checks the keys and the account but cannot check the webhook subscription.
|
|
94
222
|
- **Setting `publishableKey` is now treated as a declaration of intent.** Previously the package held that signal at module init and did nothing with it: the key gates `createPaymentIntent`, so configuring it means the deployment uses inline PaymentIntent flows, which is exactly what makes `payment_intent.succeeded` mandatory. With `verifyOnBoot` on, a webhook endpoint missing that subscription now logs at **error** naming the consequence in operator terms — *inline payments will succeed at Stripe and the invoice will never close* — instead of at `info`. Without a publishable key the same gap stays informational, because a Checkout-only deployment genuinely never receives that event.
|
|
95
223
|
|
|
224
|
+
- **`RefundService` refuses to create a refund record it cannot key.** A
|
|
225
|
+
`refund.succeeded` event with no `providerRefundId` is logged at `error` and
|
|
226
|
+
skipped rather than written. Independent of the gateway fix above and kept
|
|
227
|
+
deliberately: any event missing the id is undeduplicatable, and a missing
|
|
228
|
+
record surfaces at reconciliation while a duplicate silently misstates what a
|
|
229
|
+
client paid.
|
|
230
|
+
|
|
231
|
+
- **`providerData.recordedBy` on every `Refund` row** — `'api'`, `'webhook'`, or
|
|
232
|
+
`'manual'` — distinguishing a refund the package initiated from one the
|
|
233
|
+
provider reported from one entered by hand. Previously a duplicate was
|
|
234
|
+
indistinguishable in the data from a legitimate dashboard refund, which is
|
|
235
|
+
most of why the bug above took as long as it did to diagnose. Requires nothing
|
|
236
|
+
from consumers; `providerData` was already free-form.
|
|
237
|
+
|
|
238
|
+
- **`STRIPE_DEPRECATED_WEBHOOK_EVENTS`** — events the gateway still recognises
|
|
239
|
+
but deliberately no longer acts on, so a consumer asserting their live
|
|
240
|
+
subscription list can distinguish "safe to remove" from "missing".
|
|
241
|
+
|
|
242
|
+
- **`src/services/refund.service.spec.ts`** — the refund service had no test
|
|
243
|
+
coverage at all, which is why the above shipped. 21 cases, of which 11 fail
|
|
244
|
+
against `0.4.0-rc.2`.
|
|
245
|
+
- **`paymentIntentId` on the `PaymentGateway.getPaymentStatus` return type.**
|
|
246
|
+
Optional, so gateway implementations written before this keep compiling.
|
|
247
|
+
`StripeGateway` has always returned it — the interface simply did not say so,
|
|
248
|
+
which forced `PaymentService` to reach for it through an `any` cast. Set it
|
|
249
|
+
when reconciliation resolves a payment id distinct from the one queried (a
|
|
250
|
+
Checkout Session resolving to the PaymentIntent that actually moved the
|
|
251
|
+
money); callers swap it onto the payment record so later refunds address the
|
|
252
|
+
right object.
|
|
253
|
+
|
|
254
|
+
- **ESLint actually runs.** `eslint.config.mjs` (flat config, ESLint 9) is the
|
|
255
|
+
first lint config this repository has ever had: `npm run lint` was in
|
|
256
|
+
package.json and in CONTRIBUTING.md's setup block from the first commit, but
|
|
257
|
+
no config was committed, so the command always failed — and nothing noticed,
|
|
258
|
+
because CI never ran it. **CI now runs `npm run lint` in the `test` stage**,
|
|
259
|
+
which is the part that stops this recurring.
|
|
260
|
+
|
|
96
261
|
### Changed
|
|
97
262
|
- **The CHANGELOG now marks external configuration with its own `### ⚠ External configuration required` heading**, and the marker has been **retro-applied to 0.2.1 and 0.3.0** so it is reliable across the whole file — anyone upgrading from 0.1.x reads those entries, and a convention that only exists going forward does not help them. Requirements satisfied outside the consumer's repository are a different species from API changes: a compiler, a test and a code review all catch a changed signature, and none of them can see an unsubscribed webhook endpoint. The 0.2.1 requirement was previously the second-to-last sentence of a seven-line paragraph under `Fixed`, which read as a description of what was fixed rather than as a task. Consumers can now grep the versions they are skipping and build an upgrade checklist mechanically. Convention documented for readers at the top of this file and for maintainers in `CONTRIBUTING.md`.
|
|
98
263
|
|
|
264
|
+
- `STRIPE_WEBHOOK_EVENTS.always` drops `charge.refunded` and adds
|
|
265
|
+
`refund.created` and `refund.updated`.
|
|
266
|
+
- The `webhook-events` spec's `charge.refunded` fixture no longer contains an
|
|
267
|
+
expanded `refunds` sub-list. It previously supplied a field Stripe never
|
|
268
|
+
sends, so the one test covering the refund path asserted against a payload
|
|
269
|
+
that could not occur — which is why CI was green throughout.
|
|
270
|
+
- `npm run lint` now **checks** rather than silently rewriting your working
|
|
271
|
+
tree; `npm run lint:fix` applies fixes. The script previously ran
|
|
272
|
+
`eslint --fix` under the name `lint`, and its glob named a `tests/` directory
|
|
273
|
+
that has never existed.
|
|
274
|
+
|
|
99
275
|
### Testing
|
|
100
276
|
- **293 specs across 14 suites** (up from 100 at 0.3.0). Beyond the per-feature coverage above, three of those suites exist to stop a class of silent drift rather than to test a behaviour, and a fourth exercises the module as a consumer would get it:
|
|
101
277
|
- `webhook-events.spec.ts` — the exported webhook-event list against the gateway's routing switch, in both directions.
|
|
@@ -103,6 +279,16 @@ prose for buried obligations. The marker was introduced in v0.4.0 and
|
|
|
103
279
|
- `published-docs.spec.ts` — the README's exception table and reserved GraphQL type names against what the package actually exports, and that the packaged version has a CHANGELOG entry. Both lists are load-bearing: a missing exception code leaves consumers unable to map an error, and a missing reserved type name means a consumer registers the same name and their application crashes at boot.
|
|
104
280
|
- `payments.module.spec.ts` boots the real module against stub repositories, because unit tests cannot see a provider registered in the wrong place or a lifecycle hook that never fires — those surface at a consumer's boot rather than ours.
|
|
105
281
|
|
|
282
|
+
### Known issues
|
|
283
|
+
|
|
284
|
+
- **`RecurringInvoiceService.pause()` discards its `reason` argument.** There is
|
|
285
|
+
no column for it and `pause()` emits no `onRecurringInvoicePaused` event —
|
|
286
|
+
that event fires only from the auto-pause path after consecutive failures. A
|
|
287
|
+
caller passing "client requested hold" has it silently dropped. Found by the
|
|
288
|
+
first lint run; the parameter is now `_reason` so the discard is visible at
|
|
289
|
+
the definition. Left as-is here because persisting it or emitting an event is
|
|
290
|
+
a behaviour change, not a lint fix.
|
|
291
|
+
|
|
106
292
|
## [0.3.1] - 2026-08-20
|
|
107
293
|
|
|
108
294
|
> **Upgrade note.** This release repairs invoice totals going forward but does
|
package/README.md
CHANGED
|
@@ -331,7 +331,9 @@ When `stripe` config is provided, the module registers `StripeGateway` and mount
|
|
|
331
331
|
- `payment_intent.processing` — observability for delayed bank-side methods.
|
|
332
332
|
- `payment_intent.succeeded` — closes the loop for direct-PaymentIntent flows (chiefly the inline Stripe Elements surface in v0.3.0, plus any consumer calling `paymentIntents.create` directly). Required as of **v0.2.1** — without it, inline payments succeed at Stripe but the invoice never updates.
|
|
333
333
|
- `payment_intent.payment_failed` — surfaces declines back into the payment record.
|
|
334
|
-
- `
|
|
334
|
+
- `refund.created` and `refund.updated` — close the loop on refunds. Required as of **v0.4.0**, replacing `charge.refunded`. Subscribe to **both**: `refund.created` records a refund that succeeds immediately, `refund.updated` carries the ones that resolve later, including failures.
|
|
335
|
+
|
|
336
|
+
> **Upgrading from `charge.refunded`.** It is no longer routed, and a deployment that subscribes only to it will stop recording refunds entirely. The package cannot use it: the handler needed a refund id from `charge.refunds`, a paginated sub-list Stripe does not expand in webhook payloads and that a webhook cannot request expansion for. The id was absent on every delivery, so a refund issued through `createRefund` could not be matched to its own confirmation and was written twice — doubling `amountDue` and sending the client two refund emails. Fixed in v0.4.0; see the CHANGELOG. `charge.refunded` may be left subscribed (it is ignored, and logs one warning per process) or removed.
|
|
335
337
|
|
|
336
338
|
**Do not transcribe that list by hand.** As of v0.4.0 the package exports it, so your deployment can assert its live Stripe configuration against the events this version actually routes instead of against a README you read once:
|
|
337
339
|
|
|
@@ -700,6 +702,28 @@ Uses `IPaymentRepository.findStaleByStatuses`, already part of the repository in
|
|
|
700
702
|
|
|
701
703
|
Full and partial refunds through Stripe (when the originating payment went through Stripe) or manual refund records. All amounts in cents.
|
|
702
704
|
|
|
705
|
+
**Refund records are keyed by `providerRefundId`.** For a Stripe refund, that is the `re_…` id, and it is what lets the package recognise the confirming webhook as describing a refund it already recorded rather than a new one. A `refund.succeeded` event arriving without an id is refused — logged at `error` and skipped — because such an event cannot be deduplicated, and creating a row from it would double the refund. Prefer a missing record, which surfaces at reconciliation, over a duplicate, which silently misstates what a client paid. Manual refunds (against payments with no provider) legitimately have no id and are unaffected.
|
|
706
|
+
|
|
707
|
+
**One provider refund, one row — and it needs a database constraint.** Add
|
|
708
|
+
`@@unique([paymentId, providerRefundId])` to your `Refund` model (see
|
|
709
|
+
`prisma/payment-models.prisma`). Several writers converge on the same refund
|
|
710
|
+
row: the `createRefund` call that requested it, and the `refund.created` /
|
|
711
|
+
`refund.updated` webhooks Stripe emits while that call is still in flight. The
|
|
712
|
+
package converges them onto one row and treats a unique violation as "already
|
|
713
|
+
recorded", but that recovery only works if the constraint exists — without it a
|
|
714
|
+
tight race can still write duplicates. NULL never collides in a Postgres unique
|
|
715
|
+
index, so manual refunds, which have no provider id, are unaffected. Required as
|
|
716
|
+
of v0.4.0; see the CHANGELOG for the de-duplication query if you ran rc.1–rc.3.
|
|
717
|
+
|
|
718
|
+
**The provider is never called inside a transaction.** If you implement a custom
|
|
719
|
+
`PaymentGateway`, keep it that way. A transaction cannot make a network call
|
|
720
|
+
atomic — the refund happens at the provider whether or not you commit — and
|
|
721
|
+
holding one across the call both hides your own uncommitted writes from the
|
|
722
|
+
webhooks that call triggers, and pins a pooled connection for the provider's
|
|
723
|
+
full latency.
|
|
724
|
+
|
|
725
|
+
**`providerData.recordedBy`** records how each row came to exist: `'api'` (the package called the provider), `'webhook'` (the provider reported a refund the package did not initiate, e.g. one issued from the Stripe Dashboard), or `'manual'` (recorded by hand against an offline payment). Useful when reconciling, and the field a downstream ledger integration should read to decide what to publish. Added in v0.4.0.
|
|
726
|
+
|
|
703
727
|
### Payment Plans
|
|
704
728
|
|
|
705
729
|
Split an invoice into installments with per-installment due dates.
|
|
@@ -8,6 +8,8 @@ export declare class StripeGateway implements PaymentGateway, RecurringPaymentGa
|
|
|
8
8
|
private readonly publishableKeyValue;
|
|
9
9
|
private readonly paymentRepository;
|
|
10
10
|
private readonly logger;
|
|
11
|
+
private static hasWarnedChargeRefunded;
|
|
12
|
+
static resetDeprecationWarnings(): void;
|
|
11
13
|
constructor(secretKey: string, webhookSecret?: string, publishableKey?: string | null, paymentRepository?: IPaymentRepository | null);
|
|
12
14
|
get publishableKey(): string | null;
|
|
13
15
|
private requirePublishableKey;
|
|
@@ -93,7 +95,9 @@ export declare class StripeGateway implements PaymentGateway, RecurringPaymentGa
|
|
|
93
95
|
private handlePaymentIntentProcessing;
|
|
94
96
|
private handlePaymentIntentSucceeded;
|
|
95
97
|
private handlePaymentIntentFailed;
|
|
96
|
-
private
|
|
98
|
+
private handleRefundEvent;
|
|
99
|
+
private mapRefundEventType;
|
|
100
|
+
private handleDeprecatedChargeRefunded;
|
|
97
101
|
private mapPaymentIntentStatus;
|
|
98
102
|
private mapPaymentIntentStatusV2;
|
|
99
103
|
private mapRefundStatus;
|
|
@@ -9,6 +9,9 @@ const stripe_1 = __importDefault(require("stripe"));
|
|
|
9
9
|
const exceptions_1 = require("../../exceptions");
|
|
10
10
|
const types_1 = require("./types");
|
|
11
11
|
class StripeGateway {
|
|
12
|
+
static resetDeprecationWarnings() {
|
|
13
|
+
StripeGateway.hasWarnedChargeRefunded = false;
|
|
14
|
+
}
|
|
12
15
|
constructor(secretKey, webhookSecret = '', publishableKey = null, paymentRepository = null) {
|
|
13
16
|
this.providerType = 'stripe';
|
|
14
17
|
this.logger = new common_1.Logger(StripeGateway.name);
|
|
@@ -349,7 +352,7 @@ class StripeGateway {
|
|
|
349
352
|
return null;
|
|
350
353
|
default:
|
|
351
354
|
this.logger.debug(`Existing PaymentIntent ${intent.id} in unknown status ` +
|
|
352
|
-
`"${intent.status}"; creating fresh`);
|
|
355
|
+
`"${String(intent.status)}"; creating fresh`);
|
|
353
356
|
return null;
|
|
354
357
|
}
|
|
355
358
|
}
|
|
@@ -518,8 +521,11 @@ class StripeGateway {
|
|
|
518
521
|
return this.handlePaymentIntentSucceeded(event);
|
|
519
522
|
case 'payment_intent.payment_failed':
|
|
520
523
|
return this.handlePaymentIntentFailed(event);
|
|
524
|
+
case 'refund.created':
|
|
525
|
+
case 'refund.updated':
|
|
526
|
+
return this.handleRefundEvent(event);
|
|
521
527
|
case 'charge.refunded':
|
|
522
|
-
return this.
|
|
528
|
+
return this.handleDeprecatedChargeRefunded(event);
|
|
523
529
|
default:
|
|
524
530
|
this.logger.debug(`Ignoring unhandled Stripe event type "${event.type}" (eventId=${event.id})`);
|
|
525
531
|
return {
|
|
@@ -642,28 +648,60 @@ class StripeGateway {
|
|
|
642
648
|
},
|
|
643
649
|
};
|
|
644
650
|
}
|
|
645
|
-
|
|
646
|
-
const
|
|
647
|
-
const paymentIntentId = typeof
|
|
648
|
-
?
|
|
649
|
-
: (
|
|
650
|
-
const
|
|
651
|
+
handleRefundEvent(event) {
|
|
652
|
+
const refund = event.data.object;
|
|
653
|
+
const paymentIntentId = typeof refund.payment_intent === 'string'
|
|
654
|
+
? refund.payment_intent
|
|
655
|
+
: (refund.payment_intent?.id ?? '');
|
|
656
|
+
const chargeId = typeof refund.charge === 'string'
|
|
657
|
+
? refund.charge
|
|
658
|
+
: (refund.charge?.id ?? undefined);
|
|
659
|
+
const type = this.mapRefundEventType(refund.status);
|
|
660
|
+
if (!type) {
|
|
661
|
+
this.logger.debug(`Ignoring ${event.type} in non-terminal status "${refund.status}" ` +
|
|
662
|
+
`(refundId=${refund.id}, eventId=${event.id})`);
|
|
663
|
+
return { type: 'ignored', eventId: event.id, eventType: event.type };
|
|
664
|
+
}
|
|
651
665
|
return {
|
|
652
|
-
type
|
|
666
|
+
type,
|
|
653
667
|
eventId: event.id,
|
|
654
668
|
providerPaymentId: paymentIntentId,
|
|
655
|
-
providerRefundId:
|
|
656
|
-
amount:
|
|
657
|
-
currency:
|
|
658
|
-
receiptUrl: charge.receipt_url ?? undefined,
|
|
669
|
+
providerRefundId: refund.id,
|
|
670
|
+
amount: refund.amount,
|
|
671
|
+
currency: refund.currency.toUpperCase(),
|
|
659
672
|
providerData: {
|
|
660
|
-
chargeId
|
|
661
|
-
refundId:
|
|
662
|
-
refundAmount:
|
|
663
|
-
|
|
673
|
+
chargeId,
|
|
674
|
+
refundId: refund.id,
|
|
675
|
+
refundAmount: refund.amount,
|
|
676
|
+
refundStatus: refund.status,
|
|
677
|
+
failureReason: refund.failure_reason,
|
|
678
|
+
invoiceId: refund.metadata?.invoiceId,
|
|
664
679
|
},
|
|
665
680
|
};
|
|
666
681
|
}
|
|
682
|
+
mapRefundEventType(status) {
|
|
683
|
+
switch (status) {
|
|
684
|
+
case 'succeeded':
|
|
685
|
+
return 'refund.succeeded';
|
|
686
|
+
case 'failed':
|
|
687
|
+
case 'canceled':
|
|
688
|
+
return 'refund.failed';
|
|
689
|
+
default:
|
|
690
|
+
return null;
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
handleDeprecatedChargeRefunded(event) {
|
|
694
|
+
if (!StripeGateway.hasWarnedChargeRefunded) {
|
|
695
|
+
StripeGateway.hasWarnedChargeRefunded = true;
|
|
696
|
+
this.logger.warn('Received charge.refunded, which this version no longer routes — it ' +
|
|
697
|
+
'cannot identify which refund it describes. Refunds are recorded from ' +
|
|
698
|
+
'refund.created / refund.updated as of v0.4.0. Subscribe this endpoint ' +
|
|
699
|
+
'to both in the Stripe Dashboard, or refunds will not be recorded. ' +
|
|
700
|
+
'charge.refunded can then be removed from the endpoint. ' +
|
|
701
|
+
'(This warning is logged once per process.)');
|
|
702
|
+
}
|
|
703
|
+
return { type: 'ignored', eventId: event.id, eventType: event.type };
|
|
704
|
+
}
|
|
667
705
|
mapPaymentIntentStatus(status) {
|
|
668
706
|
switch (status) {
|
|
669
707
|
case 'requires_payment_method':
|
|
@@ -712,4 +750,5 @@ class StripeGateway {
|
|
|
712
750
|
}
|
|
713
751
|
}
|
|
714
752
|
exports.StripeGateway = StripeGateway;
|
|
753
|
+
StripeGateway.hasWarnedChargeRefunded = false;
|
|
715
754
|
//# sourceMappingURL=stripe.gateway.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripe.gateway.js","sourceRoot":"","sources":["../../../src/gateways/stripe/stripe.gateway.ts"],"names":[],"mappings":";;;;;;AAAA,2CAAwC;AACxC,oDAA4B;AAY5B,iDAK0B;AAC1B,mCAGiB;AAQjB,MAAa,aAAa;IASxB,YACE,SAAiB,EACjB,gBAAwB,EAAE,EAC1B,iBAAgC,IAAI,EACpC,oBAA+C,IAAI;QAZ5C,iBAAY,GAAG,QAAQ,CAAC;QAMhB,WAAM,GAAG,IAAI,eAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAQvD,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,mBAAmB,GAAG,cAAc,CAAC;QAC1C,IAAI,CAAC,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EnC,QAAQ,MAAM,EAAE,CAAC;YACf,KAAK,yBAAyB,CAAC;YAC/B,KAAK,uBAAuB,CAAC;YAC7B,KAAK,iBAAiB;gBACpB,OAAO,SAAS,CAAC;YACnB,KAAK,YAAY;gBACf,OAAO,YAAY,CAAC;YACtB,KAAK,WAAW;gBACd,OAAO,WAAW,CAAC;YACrB,KAAK,UAAU;gBACb,OAAO,WAAW,CAAC;YACrB;gBACE,OAAO,QAAQ,CAAC;QACpB,CAAC;IACH,CAAC;IAiBO,wBAAwB,CAC9B,MAAmC;QAEnC,QAAQ,MAAM,EAAE,CAAC;YACf,KAAK,yBAAyB;gBAC5B,OAAO,yBAAyB,CAAC;YACnC,KAAK,uBAAuB;gBAC1B,OAAO,uBAAuB,CAAC;YACjC,KAAK,iBAAiB;gBACpB,OAAO,iBAAiB,CAAC;YAC3B,KAAK,YAAY;gBACf,OAAO,YAAY,CAAC;YACtB,KAAK,WAAW;gBACd,OAAO,WAAW,CAAC;YACrB;gBACE,MAAM,IAAI,oCAAuB,CAC/B,oCAAoC,MAAM,+BAA+B;oBACvE,+DAA+D;oBAC/D,gEAAgE,CACnE,CAAC;QACN,CAAC;IACH,CAAC;IAEO,eAAe,CACrB,MAAqB;QAErB,QAAQ,MAAM,EAAE,CAAC;YACf,KAAK,WAAW;gBACd,OAAO,WAAW,CAAC;YACrB,KAAK,SAAS;gBACZ,OAAO,SAAS,CAAC;YACnB,KAAK,QAAQ;gBACX,OAAO,QAAQ,CAAC;YAClB;gBACE,OAAO,YAAY,CAAC;QACxB,CAAC;IACH,CAAC;;AA9zCH,sCA+zCC;AA9yCgB,qCAAuB,GAAG,KAAK,AAAR,CAAS"}
|
|
@@ -22,10 +22,11 @@ export interface StripeGatewayOptions {
|
|
|
22
22
|
export declare const STRIPE_RESERVED_GATEWAY_KEYS: readonly string[];
|
|
23
23
|
export declare const STRIPE_API_VERSION = "2025-02-24.acacia";
|
|
24
24
|
export declare const STRIPE_WEBHOOK_EVENTS: Readonly<{
|
|
25
|
-
always: readonly ["checkout.session.completed", "payment_intent.processing", "payment_intent.payment_failed", "
|
|
25
|
+
always: readonly ["checkout.session.completed", "payment_intent.processing", "payment_intent.payment_failed", "refund.created", "refund.updated"];
|
|
26
26
|
inlinePaymentIntent: readonly ["payment_intent.succeeded"];
|
|
27
27
|
}>;
|
|
28
28
|
export declare const ALL_STRIPE_WEBHOOK_EVENTS: readonly string[];
|
|
29
|
+
export declare const STRIPE_DEPRECATED_WEBHOOK_EVENTS: readonly string[];
|
|
29
30
|
export interface StripePaymentIntentGatewayOptions {
|
|
30
31
|
metadata?: Record<string, string>;
|
|
31
32
|
statement_descriptor_suffix?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.STRIPE_PAYMENT_INTENT_RESERVED_GATEWAY_KEYS = exports.ALL_STRIPE_WEBHOOK_EVENTS = exports.STRIPE_WEBHOOK_EVENTS = exports.STRIPE_API_VERSION = exports.STRIPE_RESERVED_GATEWAY_KEYS = void 0;
|
|
3
|
+
exports.STRIPE_PAYMENT_INTENT_RESERVED_GATEWAY_KEYS = exports.STRIPE_DEPRECATED_WEBHOOK_EVENTS = exports.ALL_STRIPE_WEBHOOK_EVENTS = exports.STRIPE_WEBHOOK_EVENTS = exports.STRIPE_API_VERSION = exports.STRIPE_RESERVED_GATEWAY_KEYS = void 0;
|
|
4
4
|
exports.STRIPE_RESERVED_GATEWAY_KEYS = Object.freeze([
|
|
5
5
|
'metadata.invoiceId',
|
|
6
6
|
'success_url',
|
|
@@ -15,7 +15,8 @@ exports.STRIPE_WEBHOOK_EVENTS = Object.freeze({
|
|
|
15
15
|
'checkout.session.completed',
|
|
16
16
|
'payment_intent.processing',
|
|
17
17
|
'payment_intent.payment_failed',
|
|
18
|
-
'
|
|
18
|
+
'refund.created',
|
|
19
|
+
'refund.updated',
|
|
19
20
|
]),
|
|
20
21
|
inlinePaymentIntent: Object.freeze(['payment_intent.succeeded']),
|
|
21
22
|
});
|
|
@@ -23,6 +24,7 @@ exports.ALL_STRIPE_WEBHOOK_EVENTS = Object.freeze([
|
|
|
23
24
|
...exports.STRIPE_WEBHOOK_EVENTS.always,
|
|
24
25
|
...exports.STRIPE_WEBHOOK_EVENTS.inlinePaymentIntent,
|
|
25
26
|
]);
|
|
27
|
+
exports.STRIPE_DEPRECATED_WEBHOOK_EVENTS = Object.freeze(['charge.refunded']);
|
|
26
28
|
exports.STRIPE_PAYMENT_INTENT_RESERVED_GATEWAY_KEYS = Object.freeze([
|
|
27
29
|
'metadata.invoiceId',
|
|
28
30
|
'amount',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/gateways/stripe/types.ts"],"names":[],"mappings":";;;AAsEa,QAAA,4BAA4B,GAAsB,MAAM,CAAC,MAAM,CAAC;IAC3E,oBAAoB;IACpB,aAAa;IACb,YAAY;IACZ,qBAAqB;IACrB,MAAM;IACN,YAAY;CACb,CAAC,CAAC;AAYU,QAAA,kBAAkB,GAAG,mBAAmB,CAAC;AAyCzC,QAAA,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC;IAEjD,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;QACpB,4BAA4B;QAC5B,2BAA2B;QAC3B,+BAA+B;QAC/B,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/gateways/stripe/types.ts"],"names":[],"mappings":";;;AAsEa,QAAA,4BAA4B,GAAsB,MAAM,CAAC,MAAM,CAAC;IAC3E,oBAAoB;IACpB,aAAa;IACb,YAAY;IACZ,qBAAqB;IACrB,MAAM;IACN,YAAY;CACb,CAAC,CAAC;AAYU,QAAA,kBAAkB,GAAG,mBAAmB,CAAC;AAyCzC,QAAA,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC;IAEjD,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;QACpB,4BAA4B;QAC5B,2BAA2B;QAC3B,+BAA+B;QAC/B,gBAAgB;QAChB,gBAAgB;KACR,CAAC;IAMX,mBAAmB,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,0BAA0B,CAAU,CAAC;CAC1E,CAAC,CAAC;AASU,QAAA,yBAAyB,GAAsB,MAAM,CAAC,MAAM,CAAC;IACxE,GAAG,6BAAqB,CAAC,MAAM;IAC/B,GAAG,6BAAqB,CAAC,mBAAmB;CAC7C,CAAC,CAAC;AA0BU,QAAA,gCAAgC,GAAsB,MAAM,CAAC,MAAM,CAC9E,CAAC,iBAAiB,CAAC,CACpB,CAAC;AAoEW,QAAA,2CAA2C,GACtD,MAAM,CAAC,MAAM,CAAC;IACZ,oBAAoB;IACpB,QAAQ;IACR,UAAU;IACV,2BAA2B;IAC3B,SAAS;IACT,gBAAgB;IAChB,YAAY;IACZ,UAAU;IACV,aAAa;CACd,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ export { RecurringInvoiceFilterInput } from './dto/recurring-invoice-filter.inpu
|
|
|
73
73
|
export { IsMetadata } from './dto/validators/is-metadata';
|
|
74
74
|
export { StripeGateway } from './gateways/stripe/stripe.gateway';
|
|
75
75
|
export type { StripeGatewayOptions, StripePaymentIntentGatewayOptions, } from './gateways/stripe/types';
|
|
76
|
-
export { STRIPE_RESERVED_GATEWAY_KEYS, STRIPE_PAYMENT_INTENT_RESERVED_GATEWAY_KEYS, STRIPE_WEBHOOK_EVENTS, ALL_STRIPE_WEBHOOK_EVENTS, STRIPE_API_VERSION, } from './gateways/stripe/types';
|
|
76
|
+
export { STRIPE_RESERVED_GATEWAY_KEYS, STRIPE_PAYMENT_INTENT_RESERVED_GATEWAY_KEYS, STRIPE_WEBHOOK_EVENTS, ALL_STRIPE_WEBHOOK_EVENTS, STRIPE_DEPRECATED_WEBHOOK_EVENTS, STRIPE_API_VERSION, } from './gateways/stripe/types';
|
|
77
77
|
export { verifyStripeConfiguration } from './gateways/stripe/verify-stripe-configuration';
|
|
78
78
|
export type { StripeConfigFinding, StripeConfigFindingCode, StripeVerificationClient, VerifyStripeConfigurationOptions, } from './gateways/stripe/verify-stripe-configuration';
|
|
79
79
|
export { PaymentsWebhook, PAYMENTS_WEBHOOK, } from './gateways/stripe/stripe-webhook.controller';
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RefundStatusEnum = exports.PaymentStatusEnum = exports.PaymentMethodEnum = exports.InvoiceStatusEnum = exports.InvoiceModel = exports.InvalidTaxConfigurationException = exports.PaymentIntentOperationNotSupportedException = exports.PaymentIntentNotCancellableException = exports.PaymentIntentNotReusableException = exports.PublishableKeyNotConfiguredException = exports.UniqueConstraintViolationException = exports.InvalidRecurringInvoiceStateException = exports.InvalidPaymentStateException = exports.RefundNotAllowedException = exports.InvoiceNumberExhaustedException = exports.InvoiceNotPayableException = exports.DuplicatePaymentException = exports.PaymentGatewayException = exports.PaymentAmountExceededException = exports.InvalidInvoiceStateException = exports.PaymentException = exports.GatewayRegistryService = exports.ETransferService = exports.CustomerService = exports.RecurringInvoiceService = exports.PaymentEmailService = exports.PaymentPlanService = exports.PaymentConfigService = exports.RefundService = exports.PaymentService = exports.InvoiceNumberService = exports.InvoiceService = exports.E_TRANSFER_CODE_PREFIX = exports.DEFAULT_CURRENCY = exports.WEBHOOK_ERROR_REPORTER = exports.PAYMENT_EMAIL_TEMPLATE_RENDERER = exports.PAYMENT_EMAIL_BRANDING_RESOLVER = exports.PAYMENT_CLIENT_RESOLVER = exports.PAYMENT_EMAIL_SENDER = exports.PAYMENT_EVENT_LISTENER = exports.TRANSACTION_MANAGER = exports.PAYMENT_CUSTOMER_REPOSITORY = exports.RECURRING_INVOICE_REPOSITORY = exports.WEBHOOK_IDEMPOTENCY_REPOSITORY = exports.PAYMENT_CONFIG_REPOSITORY = exports.PAYMENT_PLAN_REPOSITORY = exports.REFUND_REPOSITORY = exports.PAYMENT_REPOSITORY = exports.INVOICE_REPOSITORY = exports.PaymentsModule = void 0;
|
|
4
|
-
exports.
|
|
5
|
-
exports.DefaultPaymentEmailTemplateRenderer = exports.computeCycleCount = exports.computeNextInvoiceDate = exports.StaticBrandingResolver = exports.PAYMENTS_WEBHOOK = exports.PaymentsWebhook = void 0;
|
|
4
|
+
exports.STRIPE_API_VERSION = exports.STRIPE_DEPRECATED_WEBHOOK_EVENTS = exports.ALL_STRIPE_WEBHOOK_EVENTS = exports.STRIPE_WEBHOOK_EVENTS = exports.STRIPE_PAYMENT_INTENT_RESERVED_GATEWAY_KEYS = exports.STRIPE_RESERVED_GATEWAY_KEYS = exports.StripeGateway = exports.IsMetadata = exports.RecurringInvoiceFilterInput = exports.PaymentPlanFilterInput = exports.InvoiceFilterInput = exports.UpsertPaymentProviderInput = exports.UpdateRecurringTemplateInput = exports.UpdateInvoiceMetadataInput = exports.UpdatePaymentConfigInput = exports.RecordManualPaymentInput = exports.CreateRecurringLineItemInput = exports.CreateRecurringInvoiceInput = exports.CreatePaymentPlanInput = exports.CreateInstallmentInput = exports.CreateRefundInput = exports.CreateTaxComponentInput = exports.CreateLineItemInput = exports.CreateInvoiceInput = exports.PaymentIntentStatusEnum = exports.StripePublicConfigModel = exports.InlinePaymentIntentModel = exports.Paginated = exports.RecurringInvoiceTaxComponentModel = exports.RecurringInvoiceLineItemModel = exports.RecurringInvoiceStatusEnum = exports.RecurringIntervalUnitEnum = exports.RecurringInvoiceModel = exports.PaginatedRecurringInvoices = exports.PaginatedPaymentPlans = exports.PaginatedInvoices = exports.PaymentMethodSetupModel = exports.PaymentPlanInstallmentModel = exports.PaymentPlanModel = exports.PaymentProviderModel = exports.PaymentConfigModel = exports.OnlinePaymentSessionModel = exports.ETransferInstructionsModel = exports.RefundModel = exports.PaymentModel = exports.InvoiceClientModel = exports.InvoiceTaxComponentModel = exports.InvoiceLineItemModel = exports.InstallmentStatusEnum = exports.PaymentPlanStatusEnum = void 0;
|
|
5
|
+
exports.DefaultPaymentEmailTemplateRenderer = exports.computeCycleCount = exports.computeNextInvoiceDate = exports.StaticBrandingResolver = exports.PAYMENTS_WEBHOOK = exports.PaymentsWebhook = exports.verifyStripeConfiguration = void 0;
|
|
6
6
|
var payments_module_1 = require("./payments.module");
|
|
7
7
|
Object.defineProperty(exports, "PaymentsModule", { enumerable: true, get: function () { return payments_module_1.PaymentsModule; } });
|
|
8
8
|
var constants_1 = require("./constants");
|
|
@@ -157,6 +157,7 @@ Object.defineProperty(exports, "STRIPE_RESERVED_GATEWAY_KEYS", { enumerable: tru
|
|
|
157
157
|
Object.defineProperty(exports, "STRIPE_PAYMENT_INTENT_RESERVED_GATEWAY_KEYS", { enumerable: true, get: function () { return types_1.STRIPE_PAYMENT_INTENT_RESERVED_GATEWAY_KEYS; } });
|
|
158
158
|
Object.defineProperty(exports, "STRIPE_WEBHOOK_EVENTS", { enumerable: true, get: function () { return types_1.STRIPE_WEBHOOK_EVENTS; } });
|
|
159
159
|
Object.defineProperty(exports, "ALL_STRIPE_WEBHOOK_EVENTS", { enumerable: true, get: function () { return types_1.ALL_STRIPE_WEBHOOK_EVENTS; } });
|
|
160
|
+
Object.defineProperty(exports, "STRIPE_DEPRECATED_WEBHOOK_EVENTS", { enumerable: true, get: function () { return types_1.STRIPE_DEPRECATED_WEBHOOK_EVENTS; } });
|
|
160
161
|
Object.defineProperty(exports, "STRIPE_API_VERSION", { enumerable: true, get: function () { return types_1.STRIPE_API_VERSION; } });
|
|
161
162
|
var verify_stripe_configuration_1 = require("./gateways/stripe/verify-stripe-configuration");
|
|
162
163
|
Object.defineProperty(exports, "verifyStripeConfiguration", { enumerable: true, get: function () { return verify_stripe_configuration_1.verifyStripeConfiguration; } });
|