Revision 564
- Date:
- 2016/04/12 21:46:19
- Files:
-
- /utf8/plugins/payments/comps/contenido/payments/components/form_order_finder.msn (Diff) (Checkout)
- /utf8/plugins/payments/comps/contenido/payments/index.html (Diff) (Checkout)
- /utf8/plugins/payments/lib/payments/Operation.pm (Diff) (Checkout)
- /utf8/plugins/payments/lib/payments/Provider/PayTure.pm (Diff) (Checkout)
Legend:
- Added
- Removed
- Modified
-
utf8/plugins/payments/comps/contenido/payments/components/form_order_finder.msn
5 5 ev.preventDefault(); 6 6 var order_id = $(this).find('input[name=order_id]').val(); 7 7 if ( order_id ) { 8 $.ajax({ 9 'url' : '/contenido/payments/ajax/order_info.html', 10 'data' : { 'id' : order_id }, 11 'dataType' : 'json', 12 'success' : function( data ){ 13 if ( data.brief ) { 14 $('#order-info').html( data.brief ); 15 } 16 if ( data.actions ) { 17 $('#order-actions').html( data.actions ); 18 } 19 } 20 }); 8 nOrderId = parseInt(order_id); 9 RefreshOrderStatus(); 10 nCounter = 20; 21 11 } 22 12 }); 23 13 }); -
utf8/plugins/payments/comps/contenido/payments/index.html
4 4 <script type="text/javascript"> 5 5 <!-- 6 6 var nOrderId = <% $order_id || 0 %>; 7 7 var oTimer; 8 var nAjaxWaiting = 0; 9 var nCounter = 20; 10 function RefreshOrderStatus() { 11 if ( nOrderId > 0 && nAjaxWaiting == 0 ) { 12 nAjaxWaiting = 1; 13 $.ajax({ 14 'url' : '/contenido/payments/ajax/order_info.html', 15 'data' : { 'id' : nOrderId }, 16 'dataType' : 'json', 17 'success' : function( data ){ 18 nAjaxWaiting = 0; 19 if ( data.brief ) { 20 $('#order-info').html( data.brief ); 21 } 22 if ( data.actions ) { 23 $('#order-actions').html( data.actions ); 24 } 25 }, 26 'error' : function () { 27 nAjaxWaiting = 0; 28 } 29 }); 30 } 31 } 32 oTimer = setInterval( function() { 33 if ( nOrderId ) { 34 $('#counter-container').show(); 35 } else { 36 $('#counter-container').hide(); 37 } 38 if ( nCounter > 0 ) { 39 $('#refresh-counter').text( nCounter ); 40 nCounter--; 41 } else { 42 $('#refresh-counter').text( nCounter ); 43 RefreshOrderStatus(); 44 nCounter = 20; 45 } 46 }, 1000 ); 8 47 //--> 9 48 </script> 10 49 50 <div id="counter-container" style="display:none; text-align:right; padding:3px 5px; font-size:80%;">Перезагрузка через: <span id="refresh-counter"></span> сек.</div> 11 51 <table width="100%" cellspacing="0" cellpadding="0" border="0"> 12 52 <tr valign="top"> 13 53 <td width="35%"> -
utf8/plugins/payments/lib/payments/Operation.pm
8 8 'cases' => [ 9 9 ['create', 'создан'], 10 10 ['suspend', 'заморожен'], 11 ['resume', 'активирован'], 11 12 ['reform', 'изменен'], 12 13 ['append', 'доплата'], 13 14 ['cancel', 'отменен'], -
utf8/plugins/payments/lib/payments/Provider/PayTure.pm
81 81 ); 82 82 if ( ref $operation eq 'ARRAY' && @$operation ) { 83 83 my $last = $operation->[-1]; 84 if ( $last->name eq 'suspend' || $last->name eq 'cancel' ) { 85 $self->{result}{error} = 'Заказ был отменен или заморожен'; 84 if ( $last->name eq 'suspend' || $last->name eq 'cancel' || $last->name eq 'close' ) { 85 $self->{result}{error} = 'Заказ закрыт, отменен или заморожен. Оплата по нему невозможна'; 86 86 return $self; 87 87 } else { 88 88 $operation = $last;