recurrente-js 1.0.0 → 1.0.1

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 +1 -1
  2. package/readme.md +4 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "recurrente-js",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/globals.d.ts",
6
6
  "exports": {
package/readme.md CHANGED
@@ -28,10 +28,10 @@ Instala el paquete directamente desde npm o yarn.
28
28
  Crea un archivo .env en la raíz de tu proyecto y añade las siguientes claves:
29
29
 
30
30
  ```
31
- BASE_URL=https://app.recurrente.com
31
+ RECURRENTE_BASE_URL=https://app.recurrente.com
32
32
  RECURRENTE_PUBLIC_KEY=tu-public-key
33
33
  RECURRENTE_SECRET_KEY=tu-secret-key
34
- SVIX_SIGNING_SECRET=tu-svix-signing-key
34
+ RECURRENTE_SVIX_SIGNING_SECRET=tu-svix-signing-key
35
35
  ```
36
36
 
37
37
  ## Ejemplos de Uso
@@ -198,10 +198,9 @@ app.post('/webhook', (req, res) => {
198
198
  try {
199
199
  const payload = JSON.stringify(req.body);
200
200
  const headers = req.headers;
201
- const signingSecret = process.env.SVIX_SIGNING_SECRET as string;
202
201
 
203
202
  // Verificar la firma y obtener el evento
204
- const event = verifySvixSignature(payload, headers, signingSecret);
203
+ const event = verifySvixSignature(payload, headers);
205
204
 
206
205
  // Procesar el evento
207
206
  handleWebhookEvent(event);
@@ -300,7 +299,7 @@ app.post('/webhook', (req, res) => {
300
299
  const headers = req.headers;
301
300
 
302
301
  try {
303
- const event = verifySvixSignature(payload, headers, process.env.SVIX_SIGNING_SECRET!);
302
+ const event = verifySvixSignature(payload, headers);
304
303
  handleWebhookEvent(event);
305
304
  res.status(200).send('Webhook procesado');
306
305
  } catch (error) {