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);
|
||||
|
||||
if (gift && gift.type === 'subscription' && gift.member._id !== user._id) {
|
||||
gift.member = user;
|
||||
await payments.createSubscription(data);
|
||||
}
|
||||
|
||||
res.respond(200);
|
||||
},
|
||||
};
|
||||
|
||||
@@ -145,10 +145,6 @@ api.checkoutSuccess = {
|
||||
|
||||
await paypalPaymentExecute(paymentId, { payer_id: customerId });
|
||||
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('/');
|
||||
},
|
||||
};
|
||||
|
||||
@@ -121,11 +121,6 @@ api.checkout = {
|
||||
}
|
||||
|
||||
await payments[method](data);
|
||||
|
||||
if (gift && gift.type === 'subscription' && gift.member._id !== user._id) {
|
||||
gift.member = user;
|
||||
await payments.createSubscription(data);
|
||||
}
|
||||
}
|
||||
|
||||
res.respond(200, {});
|
||||
|
||||
@@ -75,12 +75,10 @@ function sendSubscriptionNotification ({
|
||||
}
|
||||
let text;
|
||||
let timestamp = new Date();
|
||||
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) {
|
||||
if (recipient.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}`;
|
||||
} 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({
|
||||
|
||||
Reference in New Issue
Block a user