@vandenberghinc/volt 1.2.18 → 1.2.19
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.
|
@@ -249,20 +249,18 @@ class Stripe {
|
|
|
249
249
|
async initialize(opts) {
|
|
250
250
|
this.products = await (0, import_products.initialize_products)(this.client, this.server, this.raw_products);
|
|
251
251
|
if (!opts.worker) {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
this.webhook_signing_secret = res.webhook_signing_secret;
|
|
265
|
-
}
|
|
252
|
+
const res = await (0, import_webhooks.register_or_update_stripe_webhook_endpoint)(this.client, this.server, {
|
|
253
|
+
/**
|
|
254
|
+
* @warning
|
|
255
|
+
* Never change the webhook_id since this could break updating the webhook endpoint
|
|
256
|
+
* if the url / description etc changes.
|
|
257
|
+
*/
|
|
258
|
+
webhook_app_id: "Volt.Stripe.Webhook",
|
|
259
|
+
webhook_url: `${this.server.full_domain}/volt/api/stripe/webhook`,
|
|
260
|
+
description: "The internal volt stripe payments webhook endpoint.",
|
|
261
|
+
ensure_enabled: true
|
|
262
|
+
});
|
|
263
|
+
this.webhook_signing_secret = res.webhook_signing_secret;
|
|
266
264
|
await this.initialize_endpoints();
|
|
267
265
|
}
|
|
268
266
|
}
|
|
@@ -245,21 +245,20 @@ export class Stripe {
|
|
|
245
245
|
// Initialize products.
|
|
246
246
|
this.products = await initialize_products(this.client, this.server, this.raw_products);
|
|
247
247
|
// Ensure the webhook is registered.
|
|
248
|
+
// Also when not running on https since we could be behind a proxy.
|
|
248
249
|
if (!opts.worker) {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
this.webhook_signing_secret = res.webhook_signing_secret;
|
|
262
|
-
}
|
|
250
|
+
const res = await register_or_update_stripe_webhook_endpoint(this.client, this.server, {
|
|
251
|
+
/**
|
|
252
|
+
* @warning
|
|
253
|
+
* Never change the webhook_id since this could break updating the webhook endpoint
|
|
254
|
+
* if the url / description etc changes.
|
|
255
|
+
*/
|
|
256
|
+
webhook_app_id: "Volt.Stripe.Webhook",
|
|
257
|
+
webhook_url: `${this.server.full_domain}/volt/api/stripe/webhook`,
|
|
258
|
+
description: "The internal volt stripe payments webhook endpoint.",
|
|
259
|
+
ensure_enabled: true,
|
|
260
|
+
});
|
|
261
|
+
this.webhook_signing_secret = res.webhook_signing_secret;
|
|
263
262
|
// Initialize endpoints.
|
|
264
263
|
await this.initialize_endpoints();
|
|
265
264
|
}
|
|
@@ -245,21 +245,20 @@ export class Stripe {
|
|
|
245
245
|
// Initialize products.
|
|
246
246
|
this.products = await initialize_products(this.client, this.server, this.raw_products);
|
|
247
247
|
// Ensure the webhook is registered.
|
|
248
|
+
// Also when not running on https since we could be behind a proxy.
|
|
248
249
|
if (!opts.worker) {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
this.webhook_signing_secret = res.webhook_signing_secret;
|
|
262
|
-
}
|
|
250
|
+
const res = await register_or_update_stripe_webhook_endpoint(this.client, this.server, {
|
|
251
|
+
/**
|
|
252
|
+
* @warning
|
|
253
|
+
* Never change the webhook_id since this could break updating the webhook endpoint
|
|
254
|
+
* if the url / description etc changes.
|
|
255
|
+
*/
|
|
256
|
+
webhook_app_id: "Volt.Stripe.Webhook",
|
|
257
|
+
webhook_url: `${this.server.full_domain}/volt/api/stripe/webhook`,
|
|
258
|
+
description: "The internal volt stripe payments webhook endpoint.",
|
|
259
|
+
ensure_enabled: true,
|
|
260
|
+
});
|
|
261
|
+
this.webhook_signing_secret = res.webhook_signing_secret;
|
|
263
262
|
// Initialize endpoints.
|
|
264
263
|
await this.initialize_endpoints();
|
|
265
264
|
}
|