Version 4.1.19.4

This commit is contained in:
Neo committed 2025-12-19 05:42:01 -08:00
1 parent 2bd5025018
commit 0dc2aee5ed
312 files changed
+53730 -32118

No files matched your search

@@ -1099,15 +1099,12 @@ class _checkout extends \IPS\Dispatcher\Controller
{
/* The payment has been approved */
if ( $this->invoice->amountToPay()->amount->isZero() )
{
/* If a guest is checking out, we need to remember that so we can automatically log them in */
$isGuest = (bool) !$this->invoice->member->member_id;
{
/* Mark the invoice paid */
$extra = $this->invoice->status_extra;
$extra['type'] = 'zero';
$this->invoice->status_extra = $extra;
$this->invoice->markPaid();
$memberJustCreated = $this->invoice->markPaid();
/* Redirect */
$destination = $this->invoice->return_uri ?: $this->invoice->url();
@@ -1117,9 +1114,9 @@ class _checkout extends \IPS\Dispatcher\Controller
}
else
{
if ( $isGuest )
if ( $memberJustCreated )
{
\IPS\Session::i()->setMember( $this->invoice->member );
\IPS\Session::i()->setMember( $memberJustCreated );
}
\IPS\Output::i()->redirect( $destination );
@@ -1421,7 +1418,7 @@ class _checkout extends \IPS\Dispatcher\Controller
/* Check Fraud Rules and capture */
try
{
$transaction->checkFraudRulesAndCapture( $maxMind );
$memberJustCreated = $transaction->checkFraudRulesAndCapture( $maxMind );
}
catch ( \LogicException $e )
{
@@ -1437,9 +1434,9 @@ class _checkout extends \IPS\Dispatcher\Controller
}
/* Logged in? */
if ( !\IPS\Member::loggedIn()->member_id and $this->invoice->member->member_id )
if ( $memberJustCreated )
{
\IPS\Session::i()->setMember( $this->invoice->member );
\IPS\Session::i()->setMember( $memberJustCreated );
}
/* Send email receipt */