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

[ljcom] r12907: LJSUP-14200: Implement integration with ...

Committer: nnikulochkina
LJSUP-14200: Implement integration with DengiOnline system
U   trunk/bin/upgrading/en_LJ.dat
U   trunk/cgi-bin/LJ/Pay/Method/CreditCard.pm
U   trunk/cgi-bin/LJ/Pay/Method/WebMoney.pm
U   trunk/cgi-bin/LJ/Widget/Shop/ThankYou.pm
U   trunk/templates/Shop/ThankYou.tmpl
Modified: trunk/bin/upgrading/en_LJ.dat
===================================================================
--- trunk/bin/upgrading/en_LJ.dat	2012-11-15 15:09:14 UTC (rev 12906)
+++ trunk/bin/upgrading/en_LJ.dat	2012-11-16 08:14:40 UTC (rev 12907)
@@ -12034,6 +12034,14 @@
 For your next purchase, you might be interested in: 
 .
 
+shop.thankyou.text.qiwi<<
+Your order has been successfully paid for and will be delivered soon.<br><br>
+<a href="[[url]]">Pay using qiwi wallet</a>.<br><br>
+Maybe you've forgotten to buy something?<br>
+For your next purchase, you might be interested in:
+.
+
+
 shop.thankyou.title=Shop
 
 shop.view.add_to_cart=Add to cart

Modified: trunk/cgi-bin/LJ/Pay/Method/CreditCard.pm
===================================================================
--- trunk/cgi-bin/LJ/Pay/Method/CreditCard.pm	2012-11-15 15:09:14 UTC (rev 12906)
+++ trunk/cgi-bin/LJ/Pay/Method/CreditCard.pm	2012-11-16 08:14:40 UTC (rev 12907)
@@ -69,10 +69,7 @@
 
     if (LJ::is_enabled('dengionline')) {
         if ( grep /$type/, @LJ::DENGIONLINE_VALID_CARDS) {
-            my $result = LJ::DengiOnline->create_bill (
-                cart_id         => $cart_id,
-                shop_method     => code(),
-            );
+            my $result = LJ::DengiOnline->create_bill ( cart_id => $cart_id );
 
             unless ($result && $result->{status} &&
                     $result->{status} eq 'OK') {

Modified: trunk/cgi-bin/LJ/Pay/Method/WebMoney.pm
===================================================================
--- trunk/cgi-bin/LJ/Pay/Method/WebMoney.pm	2012-11-15 15:09:14 UTC (rev 12906)
+++ trunk/cgi-bin/LJ/Pay/Method/WebMoney.pm	2012-11-16 08:14:40 UTC (rev 12907)
@@ -37,7 +37,6 @@
 
         my $result = LJ::DengiOnline->create_bill(
             cart_id     => $cart_id,
-            shop_method => code(),
             phone       => LJ::Request->post_param('phone_number'),
         );
         

Modified: trunk/cgi-bin/LJ/Widget/Shop/ThankYou.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/Shop/ThankYou.pm	2012-11-15 15:09:14 UTC (rev 12906)
+++ trunk/cgi-bin/LJ/Widget/Shop/ThankYou.pm	2012-11-16 08:14:40 UTC (rev 12907)
@@ -3,6 +3,8 @@
 
 use base 'LJ::Widget::Shop';
 
+use MIME::Base64;
+
 sub require_remote { 0 }
 sub require_cart { 1 }
 sub allow_cart_in_get { 1 }
@@ -94,8 +96,15 @@
         };
     }
 
+    my $qiwi_url;
+
+    if ($qiwi_url = LJ::Request->get_param('qiwi_url')) {
+        $qiwi_url = MIME::Base64::decode_base64( $qiwi_url );
+    }
+
     return {
         'promoblocks' => \@promoblocks_display,
+        'qiwi_url'    => $qiwi_url,
     };
 }
 

Modified: trunk/templates/Shop/ThankYou.tmpl
===================================================================
--- trunk/templates/Shop/ThankYou.tmpl	2012-11-15 15:09:14 UTC (rev 12906)
+++ trunk/templates/Shop/ThankYou.tmpl	2012-11-16 08:14:40 UTC (rev 12907)
@@ -1,5 +1,11 @@
 <h1><TMPL_VAR expr="ml('shop.thankyou.heading')"></h1>
 <div class="b-thankyou">
-	<p><TMPL_VAR expr="ml('shop.thankyou.text')"></p>
+	<p>
+                <TMPL_IF qiwi_url>
+                        <TMPL_VAR expr="ml('shop.thankyou.text.qiwi', 'url', qiwi_url)">
+                <TMPL_ELSE>
+                        <TMPL_VAR expr="ml('shop.thankyou.text')">
+                </TMPL_IF>
+        </p>
 </div>
 <TMPL_INCLUDE name="templates/Shop/Promoblocks.tmpl">

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