mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
chore(promo): end gift subs promo
This commit is contained in:
@@ -151,11 +151,6 @@ api.checkout = {
|
|||||||
|
|
||||||
await payments[method](data);
|
await payments[method](data);
|
||||||
|
|
||||||
if (gift && gift.type === 'subscription' && gift.member._id !== user._id) {
|
|
||||||
gift.member = user;
|
|
||||||
await payments.createSubscription(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
res.respond(200);
|
res.respond(200);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -145,10 +145,6 @@ api.checkoutSuccess = {
|
|||||||
|
|
||||||
await paypalPaymentExecute(paymentId, { payer_id: customerId });
|
await paypalPaymentExecute(paymentId, { payer_id: customerId });
|
||||||
await payments[method](data);
|
await payments[method](data);
|
||||||
if (gift && gift.type === 'subscription' && gift.member._id !== data.user._id) {
|
|
||||||
gift.member = data.user;
|
|
||||||
await payments.createSubscription(data);
|
|
||||||
}
|
|
||||||
res.redirect('/');
|
res.redirect('/');
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -121,11 +121,6 @@ api.checkout = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await payments[method](data);
|
await payments[method](data);
|
||||||
|
|
||||||
if (gift && gift.type === 'subscription' && gift.member._id !== user._id) {
|
|
||||||
gift.member = user;
|
|
||||||
await payments.createSubscription(data);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
res.respond(200, {});
|
res.respond(200, {});
|
||||||
|
|||||||
@@ -75,12 +75,10 @@ function sendSubscriptionNotification ({
|
|||||||
}
|
}
|
||||||
let text;
|
let text;
|
||||||
let timestamp = new Date();
|
let timestamp = new Date();
|
||||||
if (!recipient.id) {
|
if (recipient.id) {
|
||||||
text = `${buyer.name} ${buyer.id} ${buyer.email} bought a ${months}-month recurring subscription using ${paymentMethod} on ${timestamp}`;
|
|
||||||
} else if (recipient.id === buyer.id) {
|
|
||||||
text = `${buyer.name} ${buyer.id} ${buyer.email} bought a ${months}-month gift subscription for ${recipient.name} ${recipient.id} ${recipient.email} using ${paymentMethod} on ${timestamp}`;
|
text = `${buyer.name} ${buyer.id} ${buyer.email} bought a ${months}-month gift subscription for ${recipient.name} ${recipient.id} ${recipient.email} using ${paymentMethod} on ${timestamp}`;
|
||||||
} else {
|
} else {
|
||||||
text = `${buyer.name} ${buyer.id} ${buyer.email} bought a ${months}-month gift subscription for ${recipient.name} ${recipient.id} ${recipient.email} and got a promo using ${paymentMethod} on ${timestamp}`;
|
text = `${buyer.name} ${buyer.id} ${buyer.email} bought a ${months}-month recurring subscription using ${paymentMethod} on ${timestamp}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
subscriptionSlack.send({
|
subscriptionSlack.send({
|
||||||
|
|||||||
Reference in New Issue
Block a user