mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Corrected transaction descriptions (#7744)
* fix(subscriptions): Habitica not HabitRPG * fix(subscriptions): Habitica in Amazon
This commit is contained in:
@@ -105,10 +105,10 @@ api.checkout = {
|
|||||||
CurrencyCode: 'USD',
|
CurrencyCode: 'USD',
|
||||||
Amount: amount,
|
Amount: amount,
|
||||||
},
|
},
|
||||||
SellerNote: 'HabitRPG Payment',
|
SellerNote: 'Habitica Payment',
|
||||||
SellerOrderAttributes: {
|
SellerOrderAttributes: {
|
||||||
SellerOrderId: shared.uuid(),
|
SellerOrderId: shared.uuid(),
|
||||||
StoreName: 'HabitRPG',
|
StoreName: 'Habitica',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -122,7 +122,7 @@ api.checkout = {
|
|||||||
CurrencyCode: 'USD',
|
CurrencyCode: 'USD',
|
||||||
Amount: amount,
|
Amount: amount,
|
||||||
},
|
},
|
||||||
SellerAuthorizationNote: 'HabitRPG Payment',
|
SellerAuthorizationNote: 'Habitica Payment',
|
||||||
TransactionTimeout: 0,
|
TransactionTimeout: 0,
|
||||||
CaptureNow: true,
|
CaptureNow: true,
|
||||||
});
|
});
|
||||||
@@ -177,11 +177,11 @@ api.subscribe = {
|
|||||||
await amzLib.setBillingAgreementDetails({
|
await amzLib.setBillingAgreementDetails({
|
||||||
AmazonBillingAgreementId: billingAgreementId,
|
AmazonBillingAgreementId: billingAgreementId,
|
||||||
BillingAgreementAttributes: {
|
BillingAgreementAttributes: {
|
||||||
SellerNote: 'HabitRPG Subscription',
|
SellerNote: 'Habitica Subscription',
|
||||||
SellerBillingAgreementAttributes: {
|
SellerBillingAgreementAttributes: {
|
||||||
SellerBillingAgreementId: shared.uuid(),
|
SellerBillingAgreementId: shared.uuid(),
|
||||||
StoreName: 'HabitRPG',
|
StoreName: 'Habitica',
|
||||||
CustomInformation: 'HabitRPG Subscription',
|
CustomInformation: 'Habitica Subscription',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -197,13 +197,13 @@ api.subscribe = {
|
|||||||
CurrencyCode: 'USD',
|
CurrencyCode: 'USD',
|
||||||
Amount: sub.price,
|
Amount: sub.price,
|
||||||
},
|
},
|
||||||
SellerAuthorizationNote: 'HabitRPG Subscription Payment',
|
SellerAuthorizationNote: 'Habitica Subscription Payment',
|
||||||
TransactionTimeout: 0,
|
TransactionTimeout: 0,
|
||||||
CaptureNow: true,
|
CaptureNow: true,
|
||||||
SellerNote: 'HabitRPG Subscription Payment',
|
SellerNote: 'Habitica Subscription Payment',
|
||||||
SellerOrderAttributes: {
|
SellerOrderAttributes: {
|
||||||
SellerOrderId: shared.uuid(),
|
SellerOrderId: shared.uuid(),
|
||||||
StoreName: 'HabitRPG',
|
StoreName: 'Habitica',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -63,14 +63,14 @@ api.checkout = {
|
|||||||
req.session.gift = req.query.gift;
|
req.session.gift = req.query.gift;
|
||||||
|
|
||||||
let amount = 5.00;
|
let amount = 5.00;
|
||||||
let description = 'HabitRPG gems';
|
let description = 'Habitica Gems';
|
||||||
if (gift) {
|
if (gift) {
|
||||||
if (gift.type === 'gems') {
|
if (gift.type === 'gems') {
|
||||||
amount = Number(gift.gems.amount / 4).toFixed(2);
|
amount = Number(gift.gems.amount / 4).toFixed(2);
|
||||||
description = `${description} (Gift)`;
|
description = `${description} (Gift)`;
|
||||||
} else {
|
} else {
|
||||||
amount = Number(shared.content.subscriptionBlocks[gift.subscription.key].price).toFixed(2);
|
amount = Number(shared.content.subscriptionBlocks[gift.subscription.key].price).toFixed(2);
|
||||||
description = 'mo. HabitRPG Subscription (Gift)';
|
description = 'mo. Habitica Subscription (Gift)';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,7 +166,7 @@ api.subscribe = {
|
|||||||
if (!coupon) throw new NotAuthorized(res.t('invalidCoupon'));
|
if (!coupon) throw new NotAuthorized(res.t('invalidCoupon'));
|
||||||
}
|
}
|
||||||
|
|
||||||
let billingPlanTitle = `HabitRPG Subscription ($${sub.price} every ${sub.months} months, recurring)`;
|
let billingPlanTitle = `Habitica Subscription ($${sub.price} every ${sub.months} months, recurring)`;
|
||||||
let billingAgreementAttributes = {
|
let billingAgreementAttributes = {
|
||||||
name: billingPlanTitle,
|
name: billingPlanTitle,
|
||||||
description: billingPlanTitle,
|
description: billingPlanTitle,
|
||||||
@@ -248,7 +248,7 @@ api.subscribeCancel = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// General IPN handler. We catch cancelled HabitRPG subscriptions for users who manually cancel their
|
// General IPN handler. We catch cancelled Habitica subscriptions for users who manually cancel their
|
||||||
// recurring paypal payments in their paypal dashboard. TODO ? Remove this when we can move to webhooks or some other solution
|
// recurring paypal payments in their paypal dashboard. TODO ? Remove this when we can move to webhooks or some other solution
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user