backend-manager 5.0.95 → 5.0.96
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 +1 -1
- package/src/manager/events/firestore/payments-webhooks/transitions/one-time/purchase-completed.js +1 -1
- package/src/manager/events/firestore/payments-webhooks/transitions/subscription/cancellation-requested.js +1 -1
- package/src/manager/events/firestore/payments-webhooks/transitions/subscription/new-subscription.js +2 -1
- package/src/manager/events/firestore/payments-webhooks/transitions/subscription/payment-failed.js +1 -1
- package/src/manager/events/firestore/payments-webhooks/transitions/subscription/payment-recovered.js +1 -1
- package/src/manager/events/firestore/payments-webhooks/transitions/subscription/plan-changed.js +1 -1
- package/src/manager/events/firestore/payments-webhooks/transitions/subscription/subscription-cancelled.js +1 -1
package/package.json
CHANGED
package/src/manager/events/firestore/payments-webhooks/transitions/one-time/purchase-completed.js
CHANGED
|
@@ -9,7 +9,7 @@ module.exports = async function ({ before, after, order, uid, userDoc, assistant
|
|
|
9
9
|
|
|
10
10
|
sendOrderEmail({
|
|
11
11
|
template: 'main/order/confirmation',
|
|
12
|
-
subject:
|
|
12
|
+
subject: `Your order is confirmed! #${order?.id || ''}`,
|
|
13
13
|
categories: ['order/confirmation'],
|
|
14
14
|
userDoc,
|
|
15
15
|
assistant,
|
|
@@ -9,7 +9,7 @@ module.exports = async function ({ before, after, order, uid, userDoc, assistant
|
|
|
9
9
|
|
|
10
10
|
sendOrderEmail({
|
|
11
11
|
template: 'main/order/cancellation-requested',
|
|
12
|
-
subject:
|
|
12
|
+
subject: `Your subscription cancellation is confirmed #${order?.id || ''}`,
|
|
13
13
|
categories: ['order/cancellation-requested'],
|
|
14
14
|
userDoc,
|
|
15
15
|
assistant,
|
package/src/manager/events/firestore/payments-webhooks/transitions/subscription/new-subscription.js
CHANGED
|
@@ -7,12 +7,13 @@ const { sendOrderEmail, formatDate } = require('../send-email.js');
|
|
|
7
7
|
|
|
8
8
|
module.exports = async function ({ before, after, order, uid, userDoc, assistant }) {
|
|
9
9
|
const isTrial = after.trial?.claimed === true;
|
|
10
|
+
const brandName = assistant.Manager.config.brand?.name || '';
|
|
10
11
|
|
|
11
12
|
assistant.log(`Transition [subscription/new-subscription]: uid=${uid}, product=${after.product?.id}, frequency=${after.payment?.frequency}, trial=${isTrial}`);
|
|
12
13
|
|
|
13
14
|
sendOrderEmail({
|
|
14
15
|
template: 'main/order/confirmation',
|
|
15
|
-
subject:
|
|
16
|
+
subject: `Your order from ${brandName} #${order?.id || ''}`,
|
|
16
17
|
categories: ['order/confirmation'],
|
|
17
18
|
userDoc,
|
|
18
19
|
assistant,
|
package/src/manager/events/firestore/payments-webhooks/transitions/subscription/payment-failed.js
CHANGED
|
@@ -9,7 +9,7 @@ module.exports = async function ({ before, after, order, uid, userDoc, assistant
|
|
|
9
9
|
|
|
10
10
|
sendOrderEmail({
|
|
11
11
|
template: 'main/order/payment-failed',
|
|
12
|
-
subject:
|
|
12
|
+
subject: `Your payment failed #${order?.id || ''}`,
|
|
13
13
|
categories: ['order/payment-failed'],
|
|
14
14
|
userDoc,
|
|
15
15
|
assistant,
|
package/src/manager/events/firestore/payments-webhooks/transitions/subscription/payment-recovered.js
CHANGED
|
@@ -9,7 +9,7 @@ module.exports = async function ({ before, after, order, uid, userDoc, assistant
|
|
|
9
9
|
|
|
10
10
|
sendOrderEmail({
|
|
11
11
|
template: 'main/order/payment-recovered',
|
|
12
|
-
subject:
|
|
12
|
+
subject: `Your payment was successful #${order?.id || ''}`,
|
|
13
13
|
categories: ['order/payment-recovered'],
|
|
14
14
|
userDoc,
|
|
15
15
|
assistant,
|
package/src/manager/events/firestore/payments-webhooks/transitions/subscription/plan-changed.js
CHANGED
|
@@ -10,7 +10,7 @@ module.exports = async function ({ before, after, order, uid, userDoc, assistant
|
|
|
10
10
|
|
|
11
11
|
sendOrderEmail({
|
|
12
12
|
template: 'main/order/plan-changed',
|
|
13
|
-
subject:
|
|
13
|
+
subject: `Your subscription plan has been updated #${order?.id || ''}`,
|
|
14
14
|
categories: ['order/plan-changed'],
|
|
15
15
|
userDoc,
|
|
16
16
|
assistant,
|
|
@@ -12,7 +12,7 @@ module.exports = async function ({ before, after, order, uid, userDoc, assistant
|
|
|
12
12
|
|
|
13
13
|
sendOrderEmail({
|
|
14
14
|
template: 'main/order/cancelled',
|
|
15
|
-
subject:
|
|
15
|
+
subject: `Your subscription has been cancelled #${order?.id || ''}`,
|
|
16
16
|
categories: ['order/cancelled'],
|
|
17
17
|
userDoc,
|
|
18
18
|
assistant,
|