Skip to content

Commit

Permalink
Ticket #4140 - Group based: Edit Pricing page should force an author …
Browse files Browse the repository at this point in the history
…to fill in Payments Settings.
  • Loading branch information
AntonLV committed Nov 25, 2022
1 parent 59b6b7c commit 9f6b930
Show file tree
Hide file tree
Showing 4 changed files with 154 additions and 142 deletions.
10 changes: 9 additions & 1 deletion modules/base/groups/classes/BxBaseModGroupsModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,10 @@ public function serviceEntityPricing($iProfileId = 0)
if(!$this->_oConfig->isPaidJoin())
return '';

$oPayments = BxDolPayments::getInstance();
if(!$oPayments->isActive())
return MsgBox(_t('_sys_payments_err_no_payments'));

if($this->checkAllowedUsePaidJoin() !== CHECK_ACTION_RESULT_ALLOWED)
return MsgBox(_t('_Access denied'));

Expand All @@ -678,7 +682,11 @@ public function serviceEntityPricing($iProfileId = 0)
if(!$oGrid)
return '';

return $oGrid->getCode();
$sNote = '';
if(!$oPayments->isAcceptingPayments($this->_iProfileId))
$sNote = MsgBox(_t('_sys_payments_err_not_accept_payments', $oPayments->getDetailsUrl()));

return $sNote . $oGrid->getCode();
}

public function serviceEntityJoin($iProfileId = 0)
Expand Down
Loading

0 comments on commit 9f6b930

Please sign in to comment.