wiki-plugin-shoppe 0.0.45 → 0.0.46

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wiki-plugin-shoppe",
3
- "version": "0.0.45",
3
+ "version": "0.0.46",
4
4
  "description": "Multi-tenant digital goods shoppe for federated wiki, powered by Sanora",
5
5
  "keywords": [
6
6
  "wiki",
package/server/server.js CHANGED
@@ -3257,6 +3257,8 @@ async function startServer(params) {
3257
3257
  tenantUuid: tenant.uuid,
3258
3258
  keywords: extractKeywords(product),
3259
3259
  shopName: tenant.name || '',
3260
+ shopName_json: JSON.stringify(tenant.name || ''),
3261
+ title_json: JSON.stringify(product.title || title),
3260
3262
  category: product.category || 'book',
3261
3263
  });
3262
3264
 
@@ -3307,7 +3309,8 @@ async function startServer(params) {
3307
3309
  proceedLabel: price === 0 ? 'Confirm Booking →' : 'Continue to Payment →',
3308
3310
  shoppeUrl,
3309
3311
  tenantUuid: tenant.uuid,
3310
- keywords: extractKeywords(product)
3312
+ keywords: extractKeywords(product),
3313
+ title_json: JSON.stringify(product.title || title),
3311
3314
  });
3312
3315
 
3313
3316
  res.set('Content-Type', 'text/html');
@@ -3376,7 +3379,8 @@ async function startServer(params) {
3376
3379
  renewalDays: String(tierInfo ? (tierInfo.renewalDays || 30) : 30),
3377
3380
  shoppeUrl,
3378
3381
  tenantUuid: tenant.uuid,
3379
- keywords: extractKeywords(product)
3382
+ keywords: extractKeywords(product),
3383
+ title_json: JSON.stringify(product.title || title),
3380
3384
  });
3381
3385
 
3382
3386
  res.set('Content-Type', 'text/html');
@@ -186,7 +186,7 @@
186
186
 
187
187
  const SHOPPE_URL = '{{shoppeUrl}}';
188
188
  const PRODUCT_ID = '{{productId}}';
189
- const TITLE = '{{title}}';
189
+ const TITLE = {{title_json}};
190
190
  const AMOUNT = {{amount}};
191
191
  const TIMEZONE = '{{timezone}}';
192
192
 
@@ -506,7 +506,7 @@
506
506
  headers: {'Content-Type': 'application/json'},
507
507
  body: JSON.stringify({
508
508
  productId: '{{productId}}',
509
- title: '{{title}}',
509
+ title: {{title_json}},
510
510
  ...(URL_PAYEES && { payees: URL_PAYEES })
511
511
  })
512
512
  });
@@ -548,7 +548,7 @@
548
548
  body: JSON.stringify({
549
549
  orderRef,
550
550
  productId: '{{productId}}',
551
- title: '{{title}}',
551
+ title: {{title_json}},
552
552
  amount: {{amount}},
553
553
  address: window.pendingAddress,
554
554
  paymentIntentId
@@ -227,7 +227,7 @@
227
227
  timestamp: _buyerTimestamp,
228
228
  signature: _buyerSignature,
229
229
  productId: '{{productId}}',
230
- title: '{{title}}',
230
+ title: {{title_json}},
231
231
  ...(URL_PAYEES && { payees: URL_PAYEES }),
232
232
  ...(IS_AFFILIATE_CHARGE && { affiliatePubKey: _affiliatePubKey })
233
233
  })
@@ -294,7 +294,7 @@
294
294
  timestamp: _buyerTimestamp,
295
295
  signature: _buyerSignature,
296
296
  productId: '{{productId}}',
297
- title: '{{title}}',
297
+ title: {{title_json}},
298
298
  ...(paymentIntentId && { paymentIntentId })
299
299
  })
300
300
  });
@@ -329,8 +329,8 @@
329
329
  const deepLink = 'shoppere://buy?' + new URLSearchParams({
330
330
  domain: window.location.hostname,
331
331
  shopId: '{{tenantUuid}}',
332
- shopName: '{{shopName}}',
333
- productTitle: '{{title}}',
332
+ shopName: {{shopName_json}},
333
+ productTitle: {{title_json}},
334
334
  productId: '{{productId}}',
335
335
  price: '{{amount}}',
336
336
  category: '{{category}}',
@@ -553,7 +553,7 @@
553
553
  body: JSON.stringify({
554
554
  recoveryKey,
555
555
  productId: '{{productId}}',
556
- title: '{{title}}',
556
+ title: {{title_json}},
557
557
  ...(URL_PAYEES && { payees: URL_PAYEES })
558
558
  })
559
559
  });
@@ -147,7 +147,7 @@
147
147
 
148
148
  const SHOPPE_URL = '{{shoppeUrl}}';
149
149
  const PRODUCT_ID = '{{productId}}';
150
- const TITLE = '{{title}}';
150
+ const TITLE = {{title_json}};
151
151
  const AMOUNT = {{amount}};
152
152
  const RENEWAL_DAYS = {{renewalDays}};
153
153