BxPaymentTemplate.php 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup Payment Payment
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxPaymentTemplate extends BxBaseModPaymentTemplate
  12. {
  13. protected $_sLangsPrefix;
  14. function __construct(&$oConfig, &$oDb)
  15. {
  16. $this->MODULE = 'bx_payment';
  17. parent::__construct($oConfig, $oDb);
  18. $this->_sLangsPrefix = $this->_oConfig->getPrefix('langs');
  19. }
  20. public function addJsCssOrders()
  21. {
  22. $this->addJs(array(
  23. 'jquery-ui/jquery.ui.widget.min.js',
  24. 'jquery-ui/jquery.ui.menu.min.js',
  25. 'jquery-ui/jquery.ui.autocomplete.min.js',
  26. 'jquery.form.min.js',
  27. 'jquery.anim.js',
  28. 'jquery.webForms.js',
  29. 'orders.js'
  30. ));
  31. $this->addCss(array('orders.css'));
  32. }
  33. public function addJsCssSubscriptions()
  34. {
  35. $this->addJs(array('jquery.form.min.js', 'jquery.anim.js', 'jquery.webForms.js', 'main.js', 'subscriptions.js'));
  36. $this->addCss(array('orders.css', 'subscriptions.css'));
  37. }
  38. public function addJsCssCart($sType = '', $iVendorId = 0)
  39. {
  40. $this->addJsTranslation(array('_bx_payment_err_nothing_selected'));
  41. $this->addJs(array('jquery.anim.js', 'main.js', 'cart.js'));
  42. $this->addCss(array('orders.css', 'cart.css'));
  43. $oModule = $this->getModule();
  44. if(!empty($iVendorId)) {
  45. $sMethod = 'getVendorInfoProviders' . bx_gen_method_name($sType);
  46. $aProviders = $this->_oDb->$sMethod($iVendorId);
  47. foreach($aProviders as $sProvider => $aProvider)
  48. $oModule->getObjectProvider($sProvider, $iVendorId)->addJsCss();
  49. }
  50. }
  51. public function addJsCssInvoices()
  52. {
  53. $this->addCss(array('invoices.css'));
  54. }
  55. public function displayBlockCheckoutOffline($oBuyer, $oSeller, $aData)
  56. {
  57. $CNF = &$this->_oConfig->CNF;
  58. $sTxtQt = _t('_bx_payment_txt_checkout_qt');
  59. $aTmplVarsItems = array();
  60. foreach($aData['items'] as $iIndex => $aItem)
  61. $aTmplVarsItems[] = array(
  62. 'item_index' => $iIndex + 1,
  63. 'item_title' => $aItem['title'],
  64. 'item_quantity' => $aItem['quantity'] . $sTxtQt
  65. );
  66. $this->addCss(array('checkout.css'));
  67. return $this->parseHtmlByName('checkout_offline.html', array(
  68. 'message' => _t('_bx_payment_txt_checkout_for', $oSeller->getDisplayName()),
  69. 'bx_repeat:items' => $aTmplVarsItems,
  70. 'amount' => $aData['currency']['sign'] . sprintf("%.2f", (float)($aData['amount'])),
  71. 'redirect_url' => $aData['return_url']
  72. ));
  73. }
  74. public function displayCartJs($sType = '', $iVendorId = 0)
  75. {
  76. $this->addJsCssCart($sType, $iVendorId);
  77. return $this->displayJsCode('cart');
  78. }
  79. public function displayAddToCartJs($iVendorId, $iModuleId, $iItemId, $iItemCount, $bNeedRedirect = false, $aCustom = array())
  80. {
  81. $sJsCode = $this->displayCartJs(BX_PAYMENT_TYPE_SINGLE, $iVendorId);
  82. $sJsMethod = $this->parseHtmlByName('add_to_cart_js.html', array(
  83. 'js_object' => $this->_oConfig->getJsObject('cart'),
  84. 'vendor_id' => $iVendorId,
  85. 'module_id' => $iModuleId,
  86. 'item_id' => $iItemId,
  87. 'item_count' => $iItemCount,
  88. 'need_redirect' => (int)$bNeedRedirect,
  89. 'custom' => !empty($aCustom) && is_array($aCustom) ? base64_encode(serialize($aCustom)) : ''
  90. ));
  91. return array($sJsCode, $sJsMethod);
  92. }
  93. public function displayAddToCartLink($iVendorId, $iModuleId, $iItemId, $iItemCount, $bNeedRedirect = false, $aCustom = array())
  94. {
  95. $this->addJsCssCart(BX_PAYMENT_TYPE_SINGLE, $iVendorId);
  96. return $this->parseHtmlByName('add_to_cart.html', array(
  97. 'js_object' => $this->_oConfig->getJsObject('cart'),
  98. 'js_content' => $this->displayJsCode('cart'),
  99. 'txt_add_to_cart' => _t($this->_sLangsPrefix . 'txt_add_to_cart'),
  100. 'vendor_id' => $iVendorId,
  101. 'module_id' => $iModuleId,
  102. 'item_id' => $iItemId,
  103. 'item_count' => $iItemCount,
  104. 'need_redirect' => (int)$bNeedRedirect,
  105. 'custom' => !empty($aCustom) && is_array($aCustom) ? base64_encode(serialize($aCustom)) : ''
  106. ));
  107. }
  108. public function displaySubscribeJs($iVendorId, $sVendorProvider, $iModuleId, $iItemId, $iItemCount = 1, $sRedirect = '', $aCustom = array())
  109. {
  110. return $this->displaySubscribeJsWithAddons($iVendorId, $sVendorProvider, $iModuleId, $iItemId, $iItemCount, '', $sRedirect, $aCustom);
  111. }
  112. public function displaySubscribeJsWithAddons($iVendorId, $sVendorProvider, $iModuleId, $iItemId, $iItemCount = 1, $sItemAddons = '', $sRedirect = '', $aCustom = array())
  113. {
  114. $aSellerProviders = $this->_oDb->getVendorInfoProvidersRecurring($iVendorId);
  115. if(empty($sVendorProvider) && count($aSellerProviders) == 1) {
  116. $aCartItem = array($iVendorId, $iModuleId, $iItemId, $iItemCount, $sItemAddons);
  117. $this->addJsCssCart(BX_PAYMENT_TYPE_RECURRING, $iVendorId);
  118. return $this->getModule()->getProviderButtonJs($aCartItem, array_shift($aSellerProviders), $sRedirect, $aCustom);
  119. }
  120. return array(
  121. $this->displayCartJs(BX_PAYMENT_TYPE_RECURRING, $iVendorId),
  122. $this->parseHtmlByName('subscribe_js.html', array(
  123. 'js_object' => $this->_oConfig->getJsObject('cart'),
  124. 'vendor_id' => $iVendorId,
  125. 'vendor_provider' => $sVendorProvider,
  126. 'module_id' => $iModuleId,
  127. 'item_id' => $iItemId,
  128. 'item_count' => $iItemCount,
  129. 'redirect' => !empty($sRedirect) ? $sRedirect : '',
  130. 'custom' => !empty($aCustom) && is_array($aCustom) ? base64_encode(serialize($aCustom)) : ''
  131. ))
  132. );
  133. }
  134. public function displaySubscribeLink($iVendorId, $sVendorProvider, $iModuleId, $iItemId, $iItemCount = 1, $sRedirect = '', $aCustom = array())
  135. {
  136. $this->addJsCssCart(BX_PAYMENT_TYPE_RECURRING, $iVendorId);
  137. return $this->parseHtmlByName('subscribe.html', array(
  138. 'js_object' => $this->_oConfig->getJsObject('cart'),
  139. 'js_content' => $this->displayJsCode('cart'),
  140. 'txt_add_to_cart' => _t($this->_sLangsPrefix . 'txt_subscribe'),
  141. 'vendor_id' => $iVendorId,
  142. 'vendor_provider' => $sVendorProvider,
  143. 'module_id' => $iModuleId,
  144. 'item_id' => $iItemId,
  145. 'item_count' => $iItemCount,
  146. 'redirect' => !empty($sRedirect) ? $sRedirect : '',
  147. 'custom' => !empty($aCustom) && is_array($aCustom) ? base64_encode(serialize($aCustom)) : ''
  148. ));
  149. }
  150. public function displaySubscriptionGetDetails($iId)
  151. {
  152. return $this->_displaySubscriptionData('get_details', $iId);
  153. }
  154. public function displaySubscriptionChangeDetails($iId)
  155. {
  156. return $this->_displaySubscriptionData('change_details', $iId);
  157. }
  158. public function displaySubscriptionGetBilling($iId)
  159. {
  160. return $this->_displaySubscriptionData('get_billing', $iId);
  161. }
  162. public function displaySubscriptionChangeBilling($iId)
  163. {
  164. return $this->_displaySubscriptionData('change_billing', $iId);
  165. }
  166. public function displayBlockCarts($iClientId)
  167. {
  168. $oGrid = BxDolGrid::getObjectInstance($this->_oConfig->getObject('grid_carts'));
  169. if(!$oGrid)
  170. return MsgBox(_t($this->_sLangsPrefix . 'msg_no_results'));
  171. $oGrid->addQueryParam('client_id', $iClientId);
  172. $this->addJsCssCart(BX_PAYMENT_TYPE_SINGLE);
  173. return $this->displayJsCode('cart') . $oGrid->getCode();
  174. }
  175. public function displayBlockCart($iClientId, $iSellerId = 0)
  176. {
  177. $oGrid = BxDolGrid::getObjectInstance($this->_oConfig->getObject('grid_cart'));
  178. if(!$oGrid || empty($iSellerId))
  179. return MsgBox(_t($this->_sLangsPrefix . 'msg_no_results'));
  180. $oGrid->addQueryParam('client_id', $iClientId);
  181. $oGrid->addQueryParam('seller_id', $iSellerId);
  182. $this->addJsCssCart(BX_PAYMENT_TYPE_SINGLE, $iSellerId);
  183. return $this->displayJsCode('cart') . $oGrid->getCode();
  184. }
  185. public function displayBlockHistory($iClientId, $iSellerId)
  186. {
  187. return $this->_displayBlockHistory('grid_history', $iClientId, $iSellerId);
  188. }
  189. public function displayBlockSbsListMy($iClientId)
  190. {
  191. $oGrid = BxDolGrid::getObjectInstance($this->_oConfig->getObject('grid_sbs_list_my'), $this->getModule()->_oTemplate);
  192. if(!$oGrid || empty($iClientId))
  193. return MsgBox(_t($this->_sLangsPrefix . 'msg_no_results'));
  194. $oGrid->addQueryParam('client_id', $iClientId);
  195. $this->addJsCssSubscriptions();
  196. return $this->displayJsCode(BX_PAYMENT_ORDERS_TYPE_SUBSCRIPTION) . $oGrid->getCode();
  197. }
  198. public function displayBlockSbsListAll()
  199. {
  200. $oGrid = BxDolGrid::getObjectInstance($this->_oConfig->getObject('grid_sbs_list_all'), $this->getModule()->_oTemplate);
  201. if(!$oGrid)
  202. return MsgBox(_t($this->_sLangsPrefix . 'msg_no_results'));
  203. $this->addJsCssSubscriptions();
  204. return $this->displayJsCode(BX_PAYMENT_ORDERS_TYPE_SUBSCRIPTION) . $oGrid->getCode();
  205. }
  206. public function displayBlockSbsHistory($iClientId)
  207. {
  208. return $this->_displayBlockHistory('grid_sbs_history', $iClientId);
  209. }
  210. public function displayBlockSbsDetails($iClientId)
  211. {
  212. return 'Details would be here';
  213. }
  214. public function displayBlockOrders($sType, $iSellerId)
  215. {
  216. $sGrid = $this->_oConfig->getObject('grid_' . $sType);
  217. $oGrid = BxDolGrid::getObjectInstance($sGrid);
  218. if(!$oGrid || empty($iSellerId))
  219. return MsgBox(_t($this->_sLangsPrefix . 'msg_no_results'));
  220. $oGrid->addQueryParam('seller_id', $iSellerId);
  221. $this->addJsCssOrders();
  222. return $this->displayJsCode($sType, array(
  223. 'sObjNameGrid' => $sGrid,
  224. 'sParamsDivider' => $this->_oConfig->getDivider('DIVIDER_GRID_FILTERS'),
  225. 'sTextSearchInput' => _t('_sys_grid_search')
  226. )) . $oGrid->getCode();
  227. }
  228. public function displayOrder($sType, $iId)
  229. {
  230. $sMethodName = 'getOrder' . bx_gen_method_name($sType);
  231. $aOrder = $this->_oDb->$sMethodName(array('type' => 'id', 'id' => $iId));
  232. $oModule = $this->getModule();
  233. $aSeller = $oModule->getVendorInfo((int)$aOrder['seller_id']);
  234. $aClient = $oModule->getProfileInfo((int)$aOrder['client_id']);
  235. $aTmplVarsLicense = array();
  236. if(in_array($sType, array(BX_PAYMENT_ORDERS_TYPE_PROCESSED, BX_PAYMENT_ORDERS_TYPE_HISTORY)))
  237. $aTmplVarsLicense = array(
  238. 'txt_license' => _t($this->_sLangsPrefix . 'txt_license'),
  239. 'license' => $aOrder['license']
  240. );
  241. $bTmplVarsShowSlrAtr = !empty($aOrder['author_id']) && $aOrder['seller_id'] != $aOrder['author_id'];
  242. $aTmplVarsAuthor = array();
  243. if($bTmplVarsShowSlrAtr) {
  244. $aAuthor = $oModule->getProfileInfo((int)$aOrder['author_id']);
  245. $aTmplVarsAuthor = array(
  246. 'txt_author' => _t($this->_sLangsPrefix . 'txt_author'),
  247. 'author_name' => $aAuthor['name'],
  248. 'author_url' => $aAuthor['link'],
  249. );
  250. }
  251. $aTmplVarsSeller = array(
  252. 'txt_seller' => _t($this->_sLangsPrefix . 'txt_seller'),
  253. 'bx_if:show_link' => array(
  254. 'condition' => !empty($aSeller['link']),
  255. 'content' => array(
  256. 'seller_name' => $aSeller['name'],
  257. 'seller_url' => $aSeller['link'],
  258. )
  259. ),
  260. 'bx_if:show_text' => array(
  261. 'condition' => empty($aSeller['link']),
  262. 'content' => array(
  263. 'seller_name' => $aSeller['name']
  264. )
  265. ),
  266. );
  267. $aResult = array_merge(array(
  268. 'txt_client' => _t($this->_sLangsPrefix . 'txt_client'),
  269. 'txt_order' => _t($this->_sLangsPrefix . 'txt_order'),
  270. 'txt_processed_with' => _t($this->_sLangsPrefix . 'txt_processed_with'),
  271. 'txt_message' => _t($this->_sLangsPrefix . 'txt_message'),
  272. 'txt_date' => _t($this->_sLangsPrefix . 'txt_date'),
  273. 'txt_products' => _t($this->_sLangsPrefix . 'txt_products'),
  274. 'client_name' => $aClient['name'],
  275. 'client_url' => $aClient['link'],
  276. 'bx_if:show_seller' => array(
  277. 'condition' => $bTmplVarsShowSlrAtr,
  278. 'content' => $aTmplVarsSeller
  279. ),
  280. 'bx_if:show_license' => array(
  281. 'condition' => !empty($aTmplVarsLicense),
  282. 'content' => $aTmplVarsLicense
  283. ),
  284. 'order' => $aOrder['order'],
  285. 'provider' => _t('_bx_payment_txt_name_' . $aOrder['provider']),
  286. 'error' => $aOrder['error_msg'],
  287. 'date' => bx_time_js($aOrder['date'], BX_FORMAT_DATE_TIME, true),
  288. 'bx_if:show_author' => array(
  289. 'condition' => $bTmplVarsShowSlrAtr,
  290. 'content' => $aTmplVarsAuthor
  291. ),
  292. 'bx_repeat:items' => array()
  293. ), $aTmplVarsSeller);
  294. if(in_array($sType, array(BX_PAYMENT_ORDERS_TYPE_PENDING, BX_PAYMENT_ORDERS_TYPE_SUBSCRIPTION)))
  295. $aItems = $this->_oConfig->descriptorsM2A($aOrder['items']);
  296. else
  297. $aItems = $this->_oConfig->descriptorsM2A($this->_oConfig->descriptorA2S(array($aOrder['seller_id'], $aOrder['module_id'], $aOrder['item_id'], $aOrder['item_count'])));
  298. foreach($aItems as $aItem) {
  299. $aInfo = $oModule->callGetCartItem((int)$aItem['module_id'], array($aItem['item_id']));
  300. if(!empty($aInfo) && is_array($aInfo))
  301. $aResult['bx_repeat:items'][] = array(
  302. 'bx_if:link' => array(
  303. 'condition' => !empty($aInfo['url']),
  304. 'content' => array(
  305. 'title' => $aInfo['title'],
  306. 'url' => $aInfo['url']
  307. )
  308. ),
  309. 'bx_if:text' => array(
  310. 'condition' => empty($aInfo['url']),
  311. 'content' => array(
  312. 'title' => $aInfo['title'],
  313. )
  314. ),
  315. 'quantity' => $aItem['item_count'],
  316. 'price' => $this->_oConfig->getPrice($aOrder['type'], $aInfo),
  317. 'currency_code' => $aSeller['currency_code']
  318. );
  319. }
  320. return $this->parseHtmlByName('order_' . $sType . '.html', $aResult);
  321. }
  322. public function displayBlockInvoices()
  323. {
  324. $sGrid = $this->_oConfig->getObject('grid_invoices');
  325. $oGrid = BxDolGrid::getObjectInstance($sGrid);
  326. if(!$oGrid)
  327. return MsgBox(_t($this->_sLangsPrefix . 'msg_no_results'));
  328. $this->addJsCssInvoices();
  329. return $oGrid->getCode();
  330. }
  331. public function displayItems($sType, $aItems = array())
  332. {
  333. $aTmplVarsItems = array();
  334. $oForm = new BxTemplFormView(array());
  335. if(!empty($aItems) && is_array($aItems))
  336. foreach($aItems as $aItem) {
  337. $fPrice = $this->_oConfig->getPrice($sType, $aItem);
  338. $aInputHidden = array(
  339. 'type' => 'hidden',
  340. 'name' => 'item-price-' . $aItem['id'],
  341. 'value' => $fPrice
  342. );
  343. $aInputCheckbox = array(
  344. 'type' => 'checkbox',
  345. 'name' => 'items[]',
  346. 'value' => $aItem['id']
  347. );
  348. $aInputText = array(
  349. 'type' => 'text',
  350. 'name' => 'item-quantity-' . $aItem['id'],
  351. 'value' => 1
  352. );
  353. $aTmplVarsItems[$aItem['title']] = array(
  354. 'id' => $aItem['id'],
  355. 'price' => $fPrice,
  356. 'bx_if:link' => array(
  357. 'condition' => !empty($aItem['url']),
  358. 'content' => array(
  359. 'url' => $aItem['url'],
  360. 'title' => $aItem['title']
  361. )
  362. ),
  363. 'bx_if:text' => array(
  364. 'condition' => empty($aItem['url']),
  365. 'content' => array(
  366. 'title' => $aItem['title']
  367. )
  368. ),
  369. 'input_hidden' => $oForm->genRow($aInputHidden),
  370. 'input_checkbox' => $oForm->genRow($aInputCheckbox),
  371. 'input_text' => $oForm->genRow($aInputText),
  372. );
  373. }
  374. if(!empty($aTmplVarsItems) && is_array($aTmplVarsItems)) {
  375. ksort($aTmplVarsItems);
  376. $aTmplVarsItems = array_values($aTmplVarsItems);
  377. }
  378. else
  379. $aTmplVarsItems = MsgBox(_t($this->_sLangsPrefix . 'msg_no_results'));
  380. return $this->parseHtmlByName('items.html', array(
  381. 'html_id' => $this->_oConfig->getHtmlIds('processed', 'order_processed_items'),
  382. 'bx_repeat:items' => $aTmplVarsItems
  383. ));
  384. }
  385. public function displayProvidersSelector($aCartItem, $aProviders, $sRedirect = '', $aCustom = array())
  386. {
  387. $oModule = $this->getModule();
  388. $aTmplVarsProviders = array();
  389. foreach($aProviders as $sProvider => $aProvider) {
  390. list($sJsCode, $sJsOnclick) = $oModule->getProviderButtonJs($aCartItem, $aProvider, $sRedirect, $aCustom);
  391. $sCaptionKey = '_bx_payment_txt_subscribe_' . $aProvider['name'];
  392. $sCaptionValue = _t($sCaptionKey);
  393. if(strcmp($sCaptionKey, $sCaptionValue) == 0)
  394. $sCaptionValue = _t($aProvider['caption']);
  395. $aTmplVarsProviders[] = array(
  396. 'button' => $this->parseHtmlByName('providers_select_button.html', array(
  397. 'onclick' => $sJsOnclick,
  398. 'title' => _t('_bx_payment_txt_checkout_with', $sCaptionValue),
  399. 'js_code' => $sJsCode
  400. ))
  401. );
  402. }
  403. return $this->parseHtmlByName('providers_select.html', array(
  404. 'bx_repeat:providers' => $aTmplVarsProviders
  405. ));
  406. }
  407. protected function _displayBlockHistory($sObject, $iClientId, $iSellerId = 0)
  408. {
  409. $oGrid = BxDolGrid::getObjectInstance($this->_oConfig->getObject($sObject), $this->getModule()->_oTemplate);
  410. if(!$oGrid || empty($iClientId))
  411. return MsgBox(_t($this->_sLangsPrefix . 'msg_no_results'));
  412. $oGrid->addQueryParam('client_id', $iClientId);
  413. if(!empty($iSellerId))
  414. $oGrid->addQueryParam('seller_id', $iSellerId);
  415. $this->addJsCssOrders();
  416. return $this->displayJsCode(BX_PAYMENT_ORDERS_TYPE_HISTORY) . $oGrid->getCode();
  417. }
  418. protected function _displaySubscriptionData($sType, $iId)
  419. {
  420. $aResult = array('code' => 1, 'message' => _t('_bx_payment_err_cannot_perform'));
  421. $aPending = $this->_oDb->getOrderPending(array('type' => 'id', 'id' => $iId));
  422. if(empty($aPending) || !is_array($aPending))
  423. return $aResult;
  424. $aSubscription = $this->_oDb->getSubscription(array('type' => 'pending_id', 'pending_id' => $iId));
  425. if(empty($aSubscription) || !is_array($aSubscription))
  426. return $aResult;
  427. $mixedResult = $this->getModule()->isAllowedManage($aPending);
  428. if($mixedResult !== true)
  429. return array('code' => 2, 'message' => $mixedResult);
  430. $sMethod = bx_gen_method_name($sType) . 'Recurring';
  431. $oProvider = $this->getModule()->getObjectProvider($aPending['provider'], $aPending['seller_id']);
  432. if($oProvider === false || !$oProvider->isActive() || !method_exists($oProvider, $sMethod))
  433. return $aResult;
  434. $mixedContent = $oProvider->$sMethod($iId, $aSubscription['customer_id'], $aSubscription['subscription_id']);
  435. if(empty($mixedContent))
  436. return $aResult;
  437. else if(is_array($mixedContent))
  438. return $mixedContent;
  439. $sKey = 'order_' . BX_PAYMENT_ORDERS_TYPE_SUBSCRIPTION . '_' . $sType;
  440. $sId = $this->_oConfig->getHtmlIds(BX_PAYMENT_ORDERS_TYPE_SUBSCRIPTION, $sKey);
  441. $sTitle = _t($this->_sLangsPrefix . 'popup_title_ods_' . $sKey);
  442. return array('popup' => array(
  443. 'html' => BxTemplFunctions::getInstance()->popupBox($sId, $sTitle, $mixedContent),
  444. 'options' => array('closeOnOuterClick' => 1)
  445. ));
  446. }
  447. }
  448. /** @} */