@paykit-sdk/polar 1.1.4 → 1.1.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.
package/dist/index.js CHANGED
@@ -156,7 +156,7 @@ var PolarProvider = class {
156
156
  return (0, import_core2.toPaykitEvent)({ type: "$customerDeleted", created: parseInt(timestamp), id, data: null });
157
157
  } else if (type === "checkout.created") {
158
158
  return (0, import_core2.toPaykitEvent)({ type: "$checkoutCreated", created: parseInt(timestamp), id, data: toPaykitCheckout(data) });
159
- } else if (type === "order.created") {
159
+ } else if (type === "order.paid" && data.status == "paid") {
160
160
  return (0, import_core2.toPaykitEvent)({ type: "$invoicePaid", created: parseInt(timestamp), id, data: toPaykitInvoice(data) });
161
161
  }
162
162
  throw new Error(`Unhandled event type: ${type}`);
package/dist/index.mjs CHANGED
@@ -134,7 +134,7 @@ var PolarProvider = class {
134
134
  return toPaykitEvent({ type: "$customerDeleted", created: parseInt(timestamp), id, data: null });
135
135
  } else if (type === "checkout.created") {
136
136
  return toPaykitEvent({ type: "$checkoutCreated", created: parseInt(timestamp), id, data: toPaykitCheckout(data) });
137
- } else if (type === "order.created") {
137
+ } else if (type === "order.paid" && data.status == "paid") {
138
138
  return toPaykitEvent({ type: "$invoicePaid", created: parseInt(timestamp), id, data: toPaykitInvoice(data) });
139
139
  }
140
140
  throw new Error(`Unhandled event type: ${type}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paykit-sdk/polar",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "Polar provider for PayKit",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",