ssafronova (ssafronova) wrote in changelog,
ssafronova
ssafronova
changelog

[ljcom] r9669: LJSUP-7267: Give more 2010

Committer: ssafronova
LJSUP-7267: Give more 2010
U   trunk/cgi-bin/LJ/Pay/Payment/PayItem/PaidAccount.pm
Modified: trunk/cgi-bin/LJ/Pay/Payment/PayItem/PaidAccount.pm
===================================================================
--- trunk/cgi-bin/LJ/Pay/Payment/PayItem/PaidAccount.pm	2010-11-02 11:11:12 UTC (rev 9668)
+++ trunk/cgi-bin/LJ/Pay/Payment/PayItem/PaidAccount.pm	2010-11-02 11:23:01 UTC (rev 9669)
@@ -657,6 +657,13 @@
         return (0, undef, undef);
     }
 
+    # promo action 'Give more 2010' (LJSUP-7267)
+    my $now = time;
+    if ($self->{'qty'} == 12 and $rcpt_u->userid != $buyer_u->userid and
+        $now >= $LJ::PAID_ACCOUNT_PROMO_TOKENS_START and $now < $LJ::PAID_ACCOUNT_PROMO_TOKENS_END) {
+        LJ::Pay::Wallet->try_add($rcpt_u, $LJ::PAID_ACCOUNT_PROMO_TOKENS_AMOUNT);
+    }
+
     # note that this user's bill changed
     $note_rec_change->($rcpt_u, $payment);
 

Tags: ljcom, pm, ssafronova
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments