holyandrew� (holyandrew) wrote in changelog,
holyandrew�
holyandrew
changelog

[ljcom] r11785: LJSUP-11857: Cyr sub domains

Committer: akanashin
LJSUP-11857: Cyr sub domains
U   trunk/cgi-bin/LJ/Console/Command/DomainRU.pm
U   trunk/htdocs/tools/endpoints/domain_ru.bml
Modified: trunk/cgi-bin/LJ/Console/Command/DomainRU.pm
===================================================================
--- trunk/cgi-bin/LJ/Console/Command/DomainRU.pm	2012-04-24 15:22:25 UTC (rev 11784)
+++ trunk/cgi-bin/LJ/Console/Command/DomainRU.pm	2012-04-25 08:42:16 UTC (rev 11785)
@@ -45,24 +45,22 @@
         my $it = LJ::Pay::Payment::PayItem::DomainRU->new_memonly(
             'item'    => 'domainru',
             'subitem' => join(':', @subitem_params),
-            'qty'     => 1,
             'anon'    => 0,
+            'qty'     => 1,
             'rcptid'  => $remote->userid,
             'amt'     => 0,
+            'status'  => 'done',
         );
-        $it->calculate_price;
         my $cart = LJ::Pay::Payment::new_cart($remote);
         return $self->error(@errs) unless $it->can_belong_to($cart, \@errs, undef, 'additem', 1);
         $cart->payvar_append('do_not_notify_recepient',1);
         $cart->add_item(%$it);
         $cart->set_method( LJ::Pay::Method::Wallet->code );
-        LJ::Pay::Wallet->pay_for_cart( $cart->get_payid );
         $it->_deliver_item if ($cart); 
         LJ::statushistory_add($u->userid, $remote->userid, 'domain_alias', $reason);
         return $self->print("Domain added");
     } elsif ($action eq 'remove') {
         LJ::Pay::Payment::PayItem::DomainRU->delete_domains($account, $domain);
-        LJ::Pay::Wallet->try_add($LJ::Pay::Payment::PayItem::DomainRU::shop_price);
         LJ::statushistory_add($u->userid, $remote->userid, 'domain_alias', $reason);
         return $self->print("Domain removed");
     } elsif ($action eq 'show') {

Modified: trunk/htdocs/tools/endpoints/domain_ru.bml
===================================================================
--- trunk/htdocs/tools/endpoints/domain_ru.bml	2012-04-24 15:22:25 UTC (rev 11784)
+++ trunk/htdocs/tools/endpoints/domain_ru.bml	2012-04-25 08:42:16 UTC (rev 11785)
@@ -54,7 +54,7 @@
     my $userid = LJ::load_user($user)->userid;
 
     if ($action eq 'delete') {
-        if (LJ::Pay::Payment::PayItem::DomainRU->delete_domains($userid, $src_name)) {
+        if (LJ::Pay::Payment::PayItem::DomainRU->delete_domains($user, $src_name)) {
             $ret->{status} = 'ok';
         } else {
             $ret->{error} = 'error';

Tags: akanashin, bml, holyandrew, ljcom, pm
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