Files
overleaf-cep/services/web/app/src/Features/Subscription/SubscriptionHelper.js
Tim Alby bbac46156b convert price_in_unit to price_in_cents
GitOrigin-RevId: bae030e9c90f8286d6e6550744849984fe81f63d
2022-01-21 09:03:29 +00:00

12 lines
341 B
JavaScript

/**
* If the user changes to a less expensive plan, we shouldn't apply the change immediately.
* This is to avoid unintended/artifical credits on users Recurly accounts.
*/
function shouldPlanChangeAtTermEnd(oldPlan, newPlan) {
return oldPlan.price_in_cents > newPlan.price_in_cents
}
module.exports = {
shouldPlanChangeAtTermEnd,
}