Skip to content

Commit

Permalink
Ticket #3275 - Related changes in Payments.
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonLV committed Mar 25, 2021
1 parent c840e01 commit e5d2b05
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 12 additions & 0 deletions inc/classes/BxDolPayments.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,18 @@ public function getAddToCartLink($iVendorId, $mixedModuleId, $iItemId, $iItemCou
return bx_srv($this->_sActive, 'get_add_to_cart_link', $aSrvParams, 'Cart');
}

/**
* Subscribe an item in background mode.
*/
public function subscribeWithAddons($iVendorId, $sVendorProvider, $mixedModuleId, $iItemId, $iItemCount = 1, $sItemAddons = '', $sRedirect = '', $aCustom = array())
{
if(!BxDolRequest::serviceExists($this->_sActive, 'subscribe_with_addons', 'Subscriptions'))
return array();

$aSrvParams = array($iVendorId, $sVendorProvider, $mixedModuleId, $iItemId, $iItemCount, $sItemAddons, $sRedirect, $aCustom);
return bx_srv($this->_sActive, 'subscribe_with_addons', $aSrvParams, 'Subscriptions');
}

public function getSubscriptionsUrl()
{
if(!BxDolRequest::serviceExists($this->_sActive, 'get_subscriptions_url', 'Subscriptions'))
Expand Down
3 changes: 2 additions & 1 deletion modules/boonex/payment/classes/BxPaymentSubscriptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,11 @@ public function serviceSubscribe($iSellerId, $sSellerProvider, $iModuleId, $iIte
/**
* @ref bx_payment-subscribe_with_addons "subscribe_with_addons"
*/
public function serviceSubscribeWithAddons($iSellerId, $sSellerProvider, $iModuleId, $iItemId, $iItemCount, $sItemAddons = '', $sRedirect = '', $aCustom = array())
public function serviceSubscribeWithAddons($iSellerId, $sSellerProvider, $mixedModuleId, $iItemId, $iItemCount, $sItemAddons = '', $sRedirect = '', $aCustom = array())
{
$CNF = &$this->_oModule->_oConfig->CNF;

$iModuleId = $this->_oModule->_oConfig->getModuleId($mixedModuleId);
$iClientId = $this->_oModule->getProfileId();

$mixedResult = $this->_oModule->checkData($iClientId, $iSellerId, $iModuleId, $iItemId, $iItemCount);
Expand Down

0 comments on commit e5d2b05

Please sign in to comment.