Parcourir la source

Ticket #620 - Cancel Subscription functionality for Administrator.

AntonLV il y a 9 ans
Parent
commit
eb240ff784

+ 6 - 0
modules/boonex/acl/classes/BxAclModule.php

@@ -131,6 +131,12 @@ class BxAclModule extends BxDolModule
     	return $this->_serviceUnregisterItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense, BX_ACL_LICENSE_TYPE_RECURRING); 
     }
 
+    public function serviceCancelSubscriptionItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder)
+    {
+    	//TODO: Do something if it's necessary.
+    	return true;
+    }
+
     protected function _serviceRegisterItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense, $sType)
     {
     	$aItem = $this->serviceGetCartItem($iItemId);

+ 1 - 0
modules/boonex/market/classes/BxMarketModule.php

@@ -329,6 +329,7 @@ class BxMarketModule extends BxBaseModTextModule
 	public function serviceCancelSubscriptionItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder)
     {
     	//TODO: Do something if it's necessary.
+    	return true;
     }
 
     protected function _serviceRegisterItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense, $sType)

+ 14 - 0
modules/boonex/payment/classes/BxPaymentDb.php

@@ -403,6 +403,20 @@ class BxPaymentDb extends BxBaseModPaymentDb
         return (int)$this->query("UPDATE `" . $this->_sPrefix . "subscriptions` SET " . $this->arrayToSQL($aValues) . " WHERE " . $this->arrayToSQL($aWhere, ' AND ')) > 0;
     }
 
+    public function deleteSubscription($mixedId, $sReason)
+    {
+    	if(!is_array($mixedId))
+    		$mixedId = array($mixedId);
+
+        //--- Move to deleted subscriptions table.   
+    	$sQuery = "INSERT IGNORE INTO `" . $this->_sPrefix . "subscriptions_deleted` SELECT *, :reason AS `reason`, UNIX_TIMESTAMP() AS `deleted` FROM `" . $this->_sPrefix . "subscriptions` WHERE `id` IN (" . $this->implode_escape($mixedId) . ")";
+		$this->query($sQuery, array(
+		    'reason' => $sReason
+		));
+
+        return (int)$this->query("DELETE FROM `" . $this->_sPrefix . "subscriptions` WHERE `id` IN (" . $this->implode_escape($mixedId) . ")") > 0;
+    }
+
     //--- Order Administration ---//
     public function onProfileDelete($iId)
     {

+ 25 - 0
modules/boonex/payment/classes/BxPaymentGridSbsAdministration.php

@@ -21,10 +21,35 @@ class BxPaymentGridSbsAdministration extends BxBaseModPaymentGridOrders
         $this->_sOrdersType = BX_PAYMENT_ORDERS_TYPE_SUBSCRIPTION;
     }
 
+    public function performActionCancel()
+    {
+    	$aIds = bx_get('ids');
+        if(!$aIds || !is_array($aIds)) 
+        	return echoJson(array());
+
+		$oSubscriptions = $this->_oModule->getObjectSubscriptions();
+
+		$iAffected = 0;
+		$aAffected = array();
+		foreach($aIds as $iId)
+			if($oSubscriptions->cancel($iId)) {
+				$aAffected[] = $iId;
+            	$iAffected++;
+			}
+
+        echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aAffected) : array('msg' => _t($this->_sLangsPrefix . 'err_cannot_perform')));
+    }
+
     protected function _getCellProvider($mixedValue, $sKey, $aField, $aRow)
     {
         return parent::_getCellDefault(_t('_bx_payment_txt_name_' . $mixedValue), $sKey, $aField, $aRow);
     }
+
+    protected function _getCellPaid($mixedValue, $sKey, $aField, $aRow)
+    {
+        $aStates = array(0 => 'no', 1 => 'yes');
+        return parent::_getCellDefault(_t('_bx_payment_txt_' . $aStates[(int)$mixedValue]), $sKey, $aField, $aRow);
+    }
 }
 
 /** @} */

+ 27 - 0
modules/boonex/payment/classes/BxPaymentProviderStripe.php

@@ -367,6 +367,15 @@ class BxPaymentProviderStripe extends BxBaseModPaymentProvider implements iBxBas
         ));
     }
 
+    public function cancelRecurring($iPendingId, $sCustomerId, $sSubscriptionId)
+    {
+        $oSubscription = $this->_cancelSubscription($sCustomerId, $sSubscriptionId);
+        if($oSubscription === false)
+            return false;
+
+        return true;
+    }
+
     public function getCheckoutParamsSingle($aParams, &$oGrid)
     {
     	if(bx_get('token') !== false)
@@ -578,6 +587,24 @@ class BxPaymentProviderStripe extends BxBaseModPaymentProvider implements iBxBas
 			return $this->_processException('Retrieve Subscription Error: ', $oException);
 		}
 
+		return $oSubscription;
+	}
+//TODO: Continue from here!
+	protected function _cancelSubscription($sCustomerId, $sSubscriptionId)
+	{
+	    try {
+	        $oSubscription = $this->_retrieveSubscription($sCustomerId, $sSubscriptionId);
+	        $oSubscription = $oSubscription->cancel();
+	    }
+	    catch (Exception $oException) {
+			return $this->_processException('Cancel Subscription Error: ', $oException);
+		}
+
+		bx_alert($this->_oModule->_oConfig->getName(), $this->_sName . '_cancel_subscription', 0, false, array(
+		    'subscription_id' => $sSubscriptionId,
+			'subscription_object' => &$oSubscription
+		));
+
 		return $oSubscription;
 	}
 

+ 28 - 0
modules/boonex/payment/classes/BxPaymentSubscriptions.php

@@ -73,6 +73,34 @@ class BxPaymentSubscriptions extends BxBaseModPaymentSubscriptions
 		return $mixedResult;
     }
 
+    public function cancel($iPendingId)
+    {
+    	$aSubscription = $this->_oModule->_oDb->getSubscription(array('type' => 'pending_id', 'pending_id' => $iPendingId));
+		if(empty($aSubscription) || !is_array($aSubscription))
+	    	return true;
+
+        $aOrder = $this->_oModule->_oDb->getOrderSubscription(array('type' => 'id', 'id' => $iPendingId));
+        if(empty($aOrder) || !is_array($aOrder))
+	    	return false;
+
+        $iSellerId = (int)$aOrder['seller_id'];
+        $oProvider = $this->_oModule->getObjectProvider($aOrder['provider'], $iSellerId);
+        if($oProvider === false || !$oProvider->isActive())
+        	return false;
+
+        if(!$oProvider->cancelRecurring($iPendingId, $aSubscription['customer_id'], $aSubscription['subscription_id']))
+            return false;
+
+        list($iSellerId, $iModuleId, $iItemId, $iItemCount) = $this->_oModule->_oConfig->descriptorS2A($aOrder['items']);
+		if(!$this->_oModule->callCancelSubscriptionItem((int)$iModuleId, array($aOrder['client_id'], $iSellerId, $iItemId, $iItemCount, $aOrder['order'])))
+			return false;
+
+		if(!$this->_oModule->_oDb->deleteSubscription($aSubscription['id'], 'cancel'))
+			return false;
+
+        return true;
+    }
+
     protected function _getBlock($sType)
     {
         $CNF = &$this->_oModule->_oConfig->CNF;

+ 5 - 1
modules/boonex/payment/install/langs/en.xml

@@ -99,6 +99,7 @@
     <string name="_bx_payment_grid_column_title_sbs_license"><![CDATA[License]]></string>
     <string name="_bx_payment_grid_column_title_sbs_amount"><![CDATA[Amount]]></string>
     <string name="_bx_payment_grid_column_title_sbs_provider"><![CDATA[Provider]]></string>
+    <string name="_bx_payment_grid_column_title_sbs_paid"><![CDATA[Paid]]></string>
     <string name="_bx_payment_grid_column_title_sbs_date"><![CDATA[Date]]></string>
 	<string name="_bx_payment_grid_column_title_crts_vendor_id"><![CDATA[Vendor]]></string>
 	<string name="_bx_payment_grid_column_title_crts_items_count"><![CDATA[Count]]></string>
@@ -114,6 +115,7 @@
 	<string name="_bx_payment_grid_action_title_ods_view_order"><![CDATA[View]]></string>
 	<string name="_bx_payment_grid_action_title_sbs_actions"><![CDATA[Actions]]></string>
 	<string name="_bx_payment_grid_action_title_sbs_view_order"><![CDATA[View]]></string>
+	<string name="_bx_payment_grid_action_title_sbs_cancel"><![CDATA[Cancel]]></string>
 	<string name="_bx_payment_grid_action_title_crts_delete"><![CDATA[Delete]]></string>
 	<string name="_bx_payment_grid_action_title_crts_continue"><![CDATA[Continue to checkout]]></string>
 	<string name="_bx_payment_grid_action_title_crt_checkout"><![CDATA[Checkout with {0}]]></string>
@@ -233,6 +235,8 @@
 	<string name="_bx_payment_txt_buyer_name_mask"><![CDATA[{0} {1}]]></string>
 	<string name="_bx_payment_txt_none"><![CDATA[none]]></string>
 	<string name="_bx_payment_txt_name_manual"><![CDATA[Manually]]></string>
+	<string name="_bx_payment_txt_yes"><![CDATA[Yes]]></string>
+	<string name="_bx_payment_txt_no"><![CDATA[No]]></string>
 
 	<!-- PayPal payment provider -->
 	<string name="_bx_payment_pp_cpt"><![CDATA[PayPal]]></string>
@@ -432,7 +436,7 @@
 	<string name="_bx_payment_strp_txt_checkout_with_single"><![CDATA[Checkout with {0}]]></string>
 	<string name="_bx_payment_strp_txt_checkout_with_recurring"><![CDATA[Checkout with {0}]]></string>
 	<string name="_bx_payment_strp_menu_item_title_details"><![CDATA[Details]]></string>
-	<string name="_bx_payment_strp_menu_item_title_details_change"><![CDATA[Change]]></string>
+	<string name="_bx_payment_strp_menu_item_title_details_change"><![CDATA[Change Details]]></string>
 	<string name="_bx_payment_strp_menu_item_title_billing"><![CDATA[Billing Info]]></string>
 	<string name="_bx_payment_strp_menu_item_title_billing_change"><![CDATA[Change Billing Info]]></string>	
 	<string name="_bx_payment_strp_txt_plan"><![CDATA[Plan]]></string>

+ 20 - 5
modules/boonex/payment/install/sql/install.sql

@@ -70,6 +70,19 @@ CREATE TABLE IF NOT EXISTS `bx_payment_subscriptions` (
   UNIQUE KEY `pending_id` (`pending_id`)
 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
 
+CREATE TABLE IF NOT EXISTS `bx_payment_subscriptions_deleted` (
+  `id` int(11) NOT NULL auto_increment,
+  `pending_id` int(11) NOT NULL default '0',
+  `customer_id` varchar(32) NOT NULL default '',
+  `subscription_id` varchar(32) NOT NULL default '',
+  `paid` tinyint(4) NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  `reason` varchar(16) NOT NULL default '',
+  `deleted` int(11) NOT NULL default '0',
+  PRIMARY KEY(`id`),
+  UNIQUE KEY `pending_id` (`pending_id`)
+) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
+
 CREATE TABLE IF NOT EXISTS `bx_payment_transactions_pending` (
   `id` int(10) unsigned NOT NULL auto_increment,
   `client_id` int(11) NOT NULL default '0',
@@ -190,7 +203,7 @@ INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `fie
 
 ('bx_payment_grid_sbs_list', 'Sql', 'SELECT `ttp`.`id` AS `id`, `ttp`.`seller_id` AS `seller_id`, `ts`.`customer_id` AS `customer_id`, `ts`.`subscription_id` AS `subscription_id`, `ttp`.`provider` AS `provider`, `ts`.`date` AS `date` FROM `bx_payment_subscriptions` AS `ts` LEFT JOIN `bx_payment_transactions_pending` AS `ttp` ON `ts`.`pending_id`=`ttp`.`id` WHERE 1 AND `ttp`.`type`=''recurring'' ', 'bx_payment_subscriptions', 'id', 'date', '', '', 100, NULL, 'start', '', 'ts`.`customer_id,ts`.`subscription_id,ts`.`date', '', 'auto', '', '', 2147483647, 'BxPaymentGridSbsList', 'modules/boonex/payment/classes/BxPaymentGridSbsList.php'),
 ('bx_payment_grid_sbs_history', 'Sql', 'SELECT `tt`.`id` AS `id`, `tt`.`seller_id` AS `seller_id`, `ttp`.`order` AS `transaction`, `tt`.`license` AS `license`, `tt`.`amount` AS `amount`, `tt`.`date` AS `date` FROM `bx_payment_transactions` AS `tt` LEFT JOIN `bx_payment_transactions_pending` AS `ttp` ON `tt`.`pending_id`=`ttp`.`id` WHERE 1 AND `ttp`.`type`=''recurring'' ', 'bx_payment_transactions', 'id', 'date', '', '', 100, NULL, 'start', '', 'ttp`.`order,tt`.`license,tt`.`amount,tt`.`date', '', 'auto', '', '', 2147483647, 'BxPaymentGridSbsHistory', 'modules/boonex/payment/classes/BxPaymentGridSbsHistory.php'),
-('bx_payment_grid_sbs_administration', 'Sql', 'SELECT `ttp`.`id` AS `id`, `ttp`.`client_id` AS `client_id`, `ttp`.`seller_id` AS `seller_id`, `ts`.`customer_id` AS `customer_id`, `ts`.`subscription_id` AS `subscription_id`, `ttp`.`provider` AS `provider`, `ts`.`date` AS `date` FROM `bx_payment_subscriptions` AS `ts` LEFT JOIN `bx_payment_transactions_pending` AS `ttp` ON `ts`.`pending_id`=`ttp`.`id` WHERE 1 AND `ttp`.`type`=''recurring'' ', 'bx_payment_subscriptions', 'id', 'date', '', '', 100, NULL, 'start', '', 'ts`.`customer_id,ts`.`subscription_id,ts`.`date', '', 'auto', '', '', 192, 'BxPaymentGridSbsAdministration', 'modules/boonex/payment/classes/BxPaymentGridSbsAdministration.php'),
+('bx_payment_grid_sbs_administration', 'Sql', 'SELECT `ttp`.`id` AS `id`, `ttp`.`client_id` AS `client_id`, `ttp`.`seller_id` AS `seller_id`, `ts`.`customer_id` AS `customer_id`, `ts`.`subscription_id` AS `subscription_id`, `ttp`.`provider` AS `provider`, `ts`.`paid` AS `paid`, `ts`.`date` AS `date` FROM `bx_payment_subscriptions` AS `ts` LEFT JOIN `bx_payment_transactions_pending` AS `ttp` ON `ts`.`pending_id`=`ttp`.`id` WHERE 1 AND `ttp`.`type`=''recurring'' ', 'bx_payment_subscriptions', 'id', 'date', '', '', 100, NULL, 'start', '', 'ts`.`customer_id,ts`.`subscription_id,ts`.`date', '', 'auto', '', '', 192, 'BxPaymentGridSbsAdministration', 'modules/boonex/payment/classes/BxPaymentGridSbsAdministration.php'),
 
 ('bx_payment_grid_orders_history', 'Sql', 'SELECT `tt`.`id` AS `id`, `tt`.`seller_id` AS `seller_id`, `ttp`.`order` AS `transaction`, `tt`.`license` AS `license`, `tt`.`amount` AS `amount`, `tt`.`date` AS `date` FROM `bx_payment_transactions` AS `tt` LEFT JOIN `bx_payment_transactions_pending` AS `ttp` ON `tt`.`pending_id`=`ttp`.`id` WHERE 1 AND `ttp`.`type`=''single'' ', 'bx_payment_transactions', 'id', 'date', '', '', 100, NULL, 'start', '', 'ttp`.`order,tt`.`license,tt`.`amount,tt`.`date', '', 'auto', '', '', 2147483647, 'BxPaymentGridHistory', 'modules/boonex/payment/classes/BxPaymentGridHistory.php'),
 ('bx_payment_grid_orders_processed', 'Sql', 'SELECT `tt`.`id` AS `id`, `tt`.`client_id` AS `client_id`, `tt`.`seller_id` AS `seller_id`, `tt`.`module_id` AS `module_id`, `tt`.`item_id` AS `item_id`, `tt`.`item_count` AS `item_count`, `ttp`.`order` AS `transaction`, `ttp`.`error_msg` AS `error_msg`, `ttp`.`provider` AS `provider`, `tt`.`license` AS `license`, `tt`.`amount` AS `amount`, `tt`.`date` AS `date` FROM `bx_payment_transactions` AS `tt` LEFT JOIN `bx_payment_transactions_pending` AS `ttp` ON `tt`.`pending_id`=`ttp`.`id` WHERE 1 ', 'bx_payment_transactions', 'id', 'date', '', '', 100, NULL, 'start', '', 'ttp`.`order,tt`.`license,tt`.`amount,tt`.`date', '', 'auto', '', '', 2147483647, 'BxPaymentGridProcessed', 'modules/boonex/payment/classes/BxPaymentGridProcessed.php'),
@@ -227,11 +240,12 @@ INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable
 
 ('bx_payment_grid_sbs_administration', 'seller_id', '_bx_payment_grid_column_title_sbs_seller_id', '15%', 0, '24', '', 1),
 ('bx_payment_grid_sbs_administration', 'client_id', '_bx_payment_grid_column_title_sbs_client_id', '15%', 0, '24', '', 2),
-('bx_payment_grid_sbs_administration', 'customer_id', '_bx_payment_grid_column_title_sbs_customer_id', '20%', 0, '24', '', 3),
-('bx_payment_grid_sbs_administration', 'subscription_id', '_bx_payment_grid_column_title_sbs_subscription_id', '20%', 0, '24', '', 4),
+('bx_payment_grid_sbs_administration', 'customer_id', '_bx_payment_grid_column_title_sbs_customer_id', '15%', 0, '18', '', 3),
+('bx_payment_grid_sbs_administration', 'subscription_id', '_bx_payment_grid_column_title_sbs_subscription_id', '15%', 0, '18', '', 4),
 ('bx_payment_grid_sbs_administration', 'provider', '_bx_payment_grid_column_title_sbs_provider', '10%', 0, '16', '', 5),
-('bx_payment_grid_sbs_administration', 'date', '_bx_payment_grid_column_title_sbs_date', '10%', 0, '10', '', 6),
-('bx_payment_grid_sbs_administration', 'actions', '', '10%', 0, '', '', 7),
+('bx_payment_grid_sbs_administration', 'paid', '_bx_payment_grid_column_title_sbs_paid', '4%', 0, '4', '', 6),
+('bx_payment_grid_sbs_administration', 'date', '_bx_payment_grid_column_title_sbs_date', '10%', 0, '10', '', 7),
+('bx_payment_grid_sbs_administration', 'actions', '', '16%', 0, '', '', 8),
 
 ('bx_payment_grid_orders_history', 'seller_id', '_bx_payment_grid_column_title_ods_seller_id', '24%', 0, '20', '', 1),
 ('bx_payment_grid_orders_history', 'transaction', '_bx_payment_grid_column_title_ods_transaction', '22%', 0, '18', '', 2),
@@ -269,6 +283,7 @@ INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon
 ('bx_payment_grid_sbs_history', 'single', 'view_order', '_bx_payment_grid_action_title_sbs_view_order', 'ellipsis-h', 1, 0, 1),
 
 ('bx_payment_grid_sbs_administration', 'single', 'view_order', '_bx_payment_grid_action_title_sbs_view_order', 'ellipsis-h', 1, 0, 1),
+('bx_payment_grid_sbs_administration', 'single', 'cancel', '_bx_payment_grid_action_title_sbs_cancel', 'times', 1, 1, 2),
 
 ('bx_payment_grid_orders_history', 'single', 'view_order', '_bx_payment_grid_action_title_ods_view_order', 'ellipsis-h', 1, 0, 1),
 

+ 1 - 0
modules/boonex/payment/install/sql/uninstall.sql

@@ -8,6 +8,7 @@ DROP TABLE IF EXISTS `bx_payment_user_values`;
 DROP TABLE IF EXISTS `bx_payment_cart`;
 DROP TABLE IF EXISTS `bx_payment_transactions`;
 DROP TABLE IF EXISTS `bx_payment_subscriptions`;
+DROP TABLE IF EXISTS `bx_payment_subscriptions_deleted`;
 DROP TABLE IF EXISTS `bx_payment_transactions_pending`;
 DROP TABLE IF EXISTS `bx_payment_modules`;
 

+ 6 - 1
modules/boonex/payment/template/css/orders.css

@@ -63,6 +63,11 @@ div.bx-payment-vo-items {
 div.bx-payment-vo-caption {
     width: 30%;
 }
-div.bx-payment-vo-content {
+div.bx-payment-vo-content,
+div.bx-payment-vo-items {
     width: 70%;
+	
+	TEXT-OVERFLOW: ellipsis;
+    -o-text-overflow: ellipsis;
+    white-space: nowrap;
 }

+ 12 - 12
modules/boonex/payment/template/order_processed.html

@@ -1,25 +1,25 @@
 <div class="bx-payment-view-order-popup">
     <div class="bx-payment-view-order-popup-cnt">
 		<div class="bx-payment-view-order bx-def-border">
-			<div class="bx-payment-vo-row bx-def-padding-thd-topbottom bx-def-border-top bx-clearfix">
-				<div class="bx-payment-vo-caption bx-def-padding-thd-left bx-def-box-sizing">__txt_client__</div><div class="bx-payment-vo-content">
+			<div class="bx-payment-vo-row bx-def-padding-thd bx-def-border-top bx-clearfix">
+				<div class="bx-payment-vo-caption">__txt_client__</div><div class="bx-payment-vo-content">
 					<a href="__client_url__" target="_blank">__client_name__</a>            
 				</div>
 			</div>
-			<div class="bx-payment-vo-row bx-def-padding-thd-topbottom bx-def-border-top bx-clearfix">
-				<div class="bx-payment-vo-caption bx-def-padding-thd-left bx-def-box-sizing">__txt_order__</div><div class="bx-payment-vo-content">__order__</div>
+			<div class="bx-payment-vo-row bx-def-padding-thd bx-def-border-top bx-clearfix">
+				<div class="bx-payment-vo-caption">__txt_order__</div><div class="bx-payment-vo-content">__order__</div>
 			</div>
-			<div class="bx-payment-vo-row bx-def-padding-thd-topbottom bx-def-border-top bx-clearfix">
-				<div class="bx-payment-vo-caption bx-def-padding-thd-left bx-def-box-sizing">__txt_processed_with__</div><div class="bx-payment-vo-content">__provider__</div>
+			<div class="bx-payment-vo-row bx-def-padding-thd bx-def-border-top bx-clearfix">
+				<div class="bx-payment-vo-caption">__txt_processed_with__</div><div class="bx-payment-vo-content">__provider__</div>
 			</div>
-			<div class="bx-payment-vo-row bx-def-padding-thd-topbottom bx-def-border-top bx-clearfix">
-				<div class="bx-payment-vo-caption bx-def-padding-thd-left bx-def-box-sizing">__txt_message__</div><div class="bx-payment-vo-content">__error__</div>
+			<div class="bx-payment-vo-row bx-def-padding-thd bx-def-border-top bx-clearfix">
+				<div class="bx-payment-vo-caption">__txt_message__</div><div class="bx-payment-vo-content">__error__</div>
 			</div>
-			<div class="bx-payment-vo-row bx-def-padding-thd-topbottom bx-def-border-top bx-clearfix">
-				<div class="bx-payment-vo-caption bx-def-padding-thd-left bx-def-box-sizing">__txt_date__</div><div class="bx-payment-vo-content">__date__</div>
+			<div class="bx-payment-vo-row bx-def-padding-thd bx-def-border-top bx-clearfix">
+				<div class="bx-payment-vo-caption">__txt_date__</div><div class="bx-payment-vo-content">__date__</div>
 			</div>
-			<div class="bx-payment-vo-row bx-def-padding-thd-topbottom bx-def-border-top bx-clearfix">
-				<div class="bx-payment-vo-caption bx-def-padding-thd-left bx-def-box-sizing">__txt_products__</div><div class="bx-payment-vo-items">
+			<div class="bx-payment-vo-row bx-def-padding-thd bx-def-border-top bx-clearfix">
+				<div class="bx-payment-vo-caption">__txt_products__</div><div class="bx-payment-vo-items">
 					<bx_repeat:items>
 						<bx_if:link><a href="__url__" target="_blank">__title__</a></bx_if:link>
 						<bx_if:text>__title__</bx_if:text>

+ 10 - 10
modules/boonex/payment/template/order_subscription.html

@@ -1,25 +1,25 @@
 <div class="bx-payment-view-order-popup">
     <div class="bx-payment-view-order-popup-cnt">
         <div class="bx-payment-view-order bx-def-border">
-            <div class="bx-payment-vo-row bx-def-padding-thd-topbottom bx-def-border-top bx-clearfix">
-                <div class="bx-payment-vo-caption bx-def-padding-thd-left bx-def-box-sizing">__txt_seller__</div><div class="bx-payment-vo-content">
+            <div class="bx-payment-vo-row bx-def-padding-thd bx-def-border-top bx-clearfix">
+                <div class="bx-payment-vo-caption">__txt_seller__</div><div class="bx-payment-vo-content">
                     <bx_if:show_link>
                         <a href="__seller_url__" target="_blank">__seller_name__</a>
                     </bx_if:show_link>
                     <bx_if:show_text>__seller_name__</bx_if:show_text>
                 </div>
             </div>
-            <div class="bx-payment-vo-row bx-def-padding-thd-topbottom bx-def-border-top bx-clearfix">
-                <div class="bx-payment-vo-caption bx-def-padding-thd-left bx-def-box-sizing">__txt_order__</div><div class="bx-payment-vo-content">__order__</div>
+            <div class="bx-payment-vo-row bx-def-padding-thd bx-def-border-top bx-clearfix">
+                <div class="bx-payment-vo-caption">__txt_order__</div><div class="bx-payment-vo-content">__order__</div>
             </div>
-            <div class="bx-payment-vo-row bx-def-padding-thd-topbottom bx-def-border-top bx-clearfix">
-                <div class="bx-payment-vo-caption bx-def-padding-thd-left bx-def-box-sizing">__txt_processed_with__</div><div class="bx-payment-vo-content">__provider__</div>
+            <div class="bx-payment-vo-row bx-def-padding-thd bx-def-border-top bx-clearfix">
+                <div class="bx-payment-vo-caption">__txt_processed_with__</div><div class="bx-payment-vo-content">__provider__</div>
             </div>
-            <div class="bx-payment-vo-row bx-def-padding-thd-topbottom bx-def-border-top bx-clearfix">
-                <div class="bx-payment-vo-caption bx-def-padding-thd-left bx-def-box-sizing">__txt_date__</div><div class="bx-payment-vo-content">__date__</div>
+            <div class="bx-payment-vo-row bx-def-padding-thd bx-def-border-top bx-clearfix">
+                <div class="bx-payment-vo-caption">__txt_date__</div><div class="bx-payment-vo-content">__date__</div>
             </div>
-            <div class="bx-payment-vo-row bx-def-padding-thd-topbottom bx-def-border-top bx-clearfix">
-                <div class="bx-payment-vo-caption bx-def-padding-thd-left bx-def-box-sizing">__txt_products__</div><div class="bx-payment-vo-items">
+            <div class="bx-payment-vo-row bx-def-padding-thd bx-def-border-top bx-clearfix">
+                <div class="bx-payment-vo-caption">__txt_products__</div><div class="bx-payment-vo-items">
                     <bx_repeat:items>
                         <bx_if:link>
                             <a href="__url__" target="_blank">__title__</a>

+ 5 - 1
modules/boonex/russian/data/langs/bx_payment/ru.xml

@@ -100,6 +100,7 @@
     <string name="_bx_payment_grid_column_title_sbs_amount"><![CDATA[Сумма]]></string>
     <string name="_bx_payment_grid_column_title_sbs_provider"><![CDATA[Поставщик]]></string>
     <string name="_bx_payment_grid_column_title_sbs_date"><![CDATA[Дата]]></string>
+    <string name="_bx_payment_grid_column_title_sbs_paid"><![CDATA[Оплачено]]></string>
 	<string name="_bx_payment_grid_column_title_crts_vendor_id"><![CDATA[Продавец]]></string>
 	<string name="_bx_payment_grid_column_title_crts_items_count"><![CDATA[Количество]]></string>
 	<string name="_bx_payment_grid_column_title_crts_items_price"><![CDATA[Цена]]></string>
@@ -109,11 +110,12 @@
 	<string name="_bx_payment_grid_column_title_crt_price"><![CDATA[Цена]]></string>
 
 	<string name="_bx_payment_grid_action_title_ods_add"><![CDATA[Добавить вручную]]></string>
-	<string name="_bx_payment_grid_action_title_ods_cancel"><![CDATA[Отмена]]></string>
+	<string name="_bx_payment_grid_action_title_ods_cancel"><![CDATA[Отменить]]></string>
 	<string name="_bx_payment_grid_action_title_ods_process"><![CDATA[Обработать]]></string>
 	<string name="_bx_payment_grid_action_title_ods_view_order"><![CDATA[Детали заказа]]></string>
 	<string name="_bx_payment_grid_action_title_sbs_actions"><![CDATA[Действия]]></string>
 	<string name="_bx_payment_grid_action_title_sbs_view_order"><![CDATA[Детали выплаты]]></string>
+	<string name="_bx_payment_grid_action_title_sbs_cancel"><![CDATA[Отменить]]></string>
 	<string name="_bx_payment_grid_action_title_crts_delete"><![CDATA[Удалить]]></string>
 	<string name="_bx_payment_grid_action_title_crts_continue"><![CDATA[Продолжить оплату]]></string>
 	<string name="_bx_payment_grid_action_title_crt_checkout"><![CDATA[Оплатить через {0}]]></string>
@@ -233,6 +235,8 @@
 	<string name="_bx_payment_txt_buyer_name_mask"><![CDATA[{0} {1}]]></string>
 	<string name="_bx_payment_txt_none"><![CDATA[нет]]></string>
 	<string name="_bx_payment_txt_name_manual"><![CDATA[Вручную]]></string>
+	<string name="_bx_payment_txt_yes"><![CDATA[Да]]></string>
+    <string name="_bx_payment_txt_no"><![CDATA[Нет]]></string>
 
 	<!-- PayPal payment provider -->
 	<string name="_bx_payment_pp_cpt"><![CDATA[PayPal]]></string>