Committer: gprochaev
LJSUP-4585U branches/shop/cgi-bin/LJ/Pay/Payment/PayItem/Coupon.pm U branches/shop/htdocs/shop/view.bml
Modified: branches/shop/cgi-bin/LJ/Pay/Payment/PayItem/Coupon.pm =================================================================== --- branches/shop/cgi-bin/LJ/Pay/Payment/PayItem/Coupon.pm 2009-10-07 07:48:21 UTC (rev 7754) +++ branches/shop/cgi-bin/LJ/Pay/Payment/PayItem/Coupon.pm 2009-10-07 07:54:39 UTC (rev 7755) @@ -7,7 +7,7 @@ sub item { return 'coupon'; } # list of dollar amount -my @coupon = (5, 15, 20, 25); +@LJ::Pay::Payment::PayItem::Coupon::coupon = (5, 15, 20, 25); sub remove_from_cart { my $self = shift; @@ -179,7 +179,7 @@ if ($type =~ /^dollaroff(int|tan)?$/ && $self->{'amt'} > 0) { ($self->{'tokenid'}, $self->{'token'}) = - LJ::Pay::new_coupon($type, $self->{'amt'}, $self->{'rcptid'}, $payment->{'payid'}); + __PACKAGE__->new_coupon($type, $self->{'amt'}, $self->{'rcptid'}, $payment->{'payid'}); # if there was an error, try again later return (0, undef, undef) unless $self->{'tokenid'}; Modified: branches/shop/htdocs/shop/view.bml =================================================================== --- branches/shop/htdocs/shop/view.bml 2009-10-07 07:48:21 UTC (rev 7754) +++ branches/shop/htdocs/shop/view.bml 2009-10-07 07:54:39 UTC (rev 7755) @@ -253,7 +253,7 @@ } } elsif ($itemname eq "giftcertificate") { my $selected = $GET{extra} || 25; - foreach my $amt (@LJ::Pay::coupon) { + foreach my $amt (@LJ::Pay::Payment::PayItem::Coupon::coupon) { my $item = LJ::Pay::Payment::PayItem->new_memonly(item => "coupon", subitem => "dollaroff", amt => $amt); my $name = $item->product_name; my $price = "(\$$amt.00 USD)";