@adonis-agora/payments 0.9.0 → 0.10.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/CHANGELOG.md +27 -0
- package/dist/assets/spa/assets/{index-6JAJxOK8.js → index-Q4Eewxjq.js} +2 -2
- package/dist/assets/spa/assets/{index-6JAJxOK8.js.map → index-Q4Eewxjq.js.map} +1 -1
- package/dist/assets/spa/index.html +1 -1
- package/dist/src/billing/billing_overview.d.ts.map +1 -1
- package/dist/src/billing/billing_overview.js +8 -4
- package/dist/src/billing/billing_overview.js.map +1 -1
- package/dist/src/billing/billing_store.d.ts +11 -0
- package/dist/src/billing/billing_store.d.ts.map +1 -1
- package/dist/src/billing/lucid_billing_store.d.ts +3 -0
- package/dist/src/billing/lucid_billing_store.d.ts.map +1 -1
- package/dist/src/billing/lucid_billing_store.js +9 -0
- package/dist/src/billing/lucid_billing_store.js.map +1 -1
- package/dist/src/billing/webhook_events.d.ts +10 -0
- package/dist/src/billing/webhook_events.d.ts.map +1 -1
- package/dist/src/billing/webhook_events.js.map +1 -1
- package/dist/src/billing/webhook_processor.d.ts.map +1 -1
- package/dist/src/billing/webhook_processor.js +6 -0
- package/dist/src/billing/webhook_processor.js.map +1 -1
- package/dist/src/drivers/asaas.d.ts.map +1 -1
- package/dist/src/drivers/asaas.js +9 -0
- package/dist/src/drivers/asaas.js.map +1 -1
- package/dist/src/drivers/stripe.d.ts +11 -0
- package/dist/src/drivers/stripe.d.ts.map +1 -1
- package/dist/src/drivers/stripe.js +54 -1
- package/dist/src/drivers/stripe.js.map +1 -1
- package/dist/src/testing/in_memory_billing_store.d.ts +3 -0
- package/dist/src/testing/in_memory_billing_store.d.ts.map +1 -1
- package/dist/src/testing/in_memory_billing_store.js +5 -0
- package/dist/src/testing/in_memory_billing_store.js.map +1 -1
- package/dist/src/types.d.ts +8 -0
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @adonis-agora/payments
|
|
2
2
|
|
|
3
|
+
## 0.10.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#34](https://github.com/DavideCarvalho/adonis-agora-payments/pull/34) [`920ec01`](https://github.com/DavideCarvalho/adonis-agora-payments/commit/920ec017e7339fc59c4f8be0349144b6332a8449) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - MRR counts gateway-owned subscriptions too, not just the library-managed ones.
|
|
8
|
+
|
|
9
|
+
The previous release scoped recurring revenue to managed subscriptions, arguing that a
|
|
10
|
+
gateway-owned one keeps its price at the gateway. True about the SOURCE and wrong about the
|
|
11
|
+
DATA: the drivers already normalised `amount`, and the cycle was sitting in every gateway's
|
|
12
|
+
payload — Asaas as `cycle`, Stripe as `price.recurring`. Nobody propagated it. Summing half a
|
|
13
|
+
book and calling it MRR was the bigger error.
|
|
14
|
+
|
|
15
|
+
- `Subscription` gains `cycle`, mapped by the Asaas and Stripe drivers.
|
|
16
|
+
- `SubscriptionWebhookData` gains `amount`, `currency` and `cycle`, so a
|
|
17
|
+
`subscription.created`/`updated` delivery carries the price to the store.
|
|
18
|
+
- `saveSubscription` persists them. **Absent does not erase**: a `subscription.canceled`
|
|
19
|
+
carries no price, and overwriting with null would drop what `created` recorded — MRR falling
|
|
20
|
+
because of an event that never mentioned money.
|
|
21
|
+
|
|
22
|
+
Stripe's cycle reads `interval` **and** `interval_count`: "every 3 months" is `month` × 3, and
|
|
23
|
+
reading only `interval` would count it as MONTHLY and inflate MRR threefold, silently. A
|
|
24
|
+
combination with no name here (every 5 months) yields `undefined` and is skipped by the
|
|
25
|
+
calculation rather than guessed.
|
|
26
|
+
|
|
27
|
+
A subscription with no price or no known cycle is still ignored rather than assumed monthly, so
|
|
28
|
+
the figure stays incomplete-but-honest instead of wrong-upwards.
|
|
29
|
+
|
|
3
30
|
## 0.9.0
|
|
4
31
|
|
|
5
32
|
### Minor Changes
|