журнал (shhh) wrote in changelog,
журнал
shhh
changelog

[ljcom] r13035: LJSUP-14580: Payment error mesages are n...

Committer: nnikulochkina
LJSUP-14580: Payment error mesages are not displayed for discover card
U   trunk/cgi-bin/LJ/Widget/CreditCard.pm
Modified: trunk/cgi-bin/LJ/Widget/CreditCard.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/CreditCard.pm	2012-12-12 12:43:17 UTC (rev 13034)
+++ trunk/cgi-bin/LJ/Widget/CreditCard.pm	2012-12-12 13:00:23 UTC (rev 13035)
@@ -356,6 +356,17 @@
                                            strict => 0,
                                            ) or die "Can't open template: $!";
 
+    # TODO: clean this!
+    my $js_include =
+        "<script type=\"text/javascript\">
+             Shop.ml_cc_num = '". LJ::ejs(LJ::Lang::ml('pay.cc.form.cardnumber.bubble-lite')) ."';
+             Shop.ml_cc_num_americanexpress = '". LJ::ejs(LJ::Lang::ml('pay.cc.form.cardnumber.bubble-lite.americanexpress')) ."';
+             Shop.ml_cc_cvv2 = '". LJ::ejs(LJ::Lang::ml('pay.cc.form.cvv2.bubble-lite', {aopts => "href='$LJ::SSLROOT/pay/cvv2.bml'"})) ."';
+             Shop.ml_cc_cvv2_americanexpress = '". LJ::ejs(LJ::Lang::ml('pay.cc.form.cvv2.bubble-lite.americanexpress', {aopts => "href='$LJ::SSLROOT/pay/cvv2.bml'"})) ."';
+         </script>";
+
+
+
     $template->param(
         %$opts,
         'selected_type' => $POST->{type},
@@ -378,6 +389,7 @@
         'postal_code'   => ( $card ? $card->get_postal_code() : $POST->{postal_code} ) || ($LJ::IS_DEV_SERVER && '12345'),
         'email'         => ( $card ? $card->get_email() : $POST->{email} ) || ($remote && $remote->email_raw),
         'ml_cardnumber' => $ml_cardnumber,
+        'js_include'    => $js_include,
     );
 
 

Tags: ljcom, nikulochkina, nnikulochkina, 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