@stravigor/cashier 0.5.3 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/webhook.ts +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stravigor/cashier",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
4
4
  "type": "module",
5
5
  "description": "Stripe billing for the Strav framework",
6
6
  "license": "MIT",
@@ -15,7 +15,7 @@
15
15
  "tsconfig.json"
16
16
  ],
17
17
  "peerDependencies": {
18
- "@stravigor/core": "0.4.5"
18
+ "@stravigor/core": "0.5.4"
19
19
  },
20
20
  "dependencies": {
21
21
  "stripe": "^17.4.0"
package/src/webhook.ts CHANGED
@@ -51,7 +51,11 @@ export function stripeWebhook(): Handler {
51
51
 
52
52
  let event: Stripe.Event
53
53
  try {
54
- event = CashierManager.stripe.webhooks.constructEvent(rawBody, signature, webhookSecret)
54
+ event = await CashierManager.stripe.webhooks.constructEventAsync(
55
+ rawBody,
56
+ signature,
57
+ webhookSecret
58
+ )
55
59
  } catch {
56
60
  throw new WebhookSignatureError()
57
61
  }