From c4f0ce692fed6a1f564bb65bee38f89e2cc4d301 Mon Sep 17 00:00:00 2001 From: drusepth Date: Thu, 10 Mar 2022 12:44:19 -0800 Subject: [PATCH] Add premium storage space to prepaid activations (#1099) --- app/jobs/pay_pal_prepay_processing_job.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/jobs/pay_pal_prepay_processing_job.rb b/app/jobs/pay_pal_prepay_processing_job.rb index 3ca107af..cf88cd75 100644 --- a/app/jobs/pay_pal_prepay_processing_job.rb +++ b/app/jobs/pay_pal_prepay_processing_job.rb @@ -27,6 +27,13 @@ class PayPalPrepayProcessingJob < ApplicationJob unless invoice.status == 'COMPLETED' invoice.update(status: 'COMPLETED') invoice.generate_promo_code! + + # Add the extra Premium space + SubscriptionService.add_any_referral_bonuses(invoice.user, 'premium') + + # Rather than queueing up a job to run N months from now to reset space, + # we'll probably go with a worker that ensures everyone's space is correct + # every day. Worker TBD. end else