chore(promo): end gift subs promo

This commit is contained in:
Sabe Jones
2017-01-07 15:42:03 +00:00
parent 857aa5827b
commit 1c859fc91f
4 changed files with 2 additions and 18 deletions

View File

@@ -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);
}, },
}; };

View File

@@ -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('/');
}, },
}; };

View File

@@ -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, {});

View File

@@ -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({