Version 4.1.19.4
This commit is contained in:
1 parent
2bd5025018
commit
0dc2aee5ed
312 files changed
+53730
-32118
No files matched your search
@@ -47,7 +47,11 @@ if ( \IPS\Settings::i()->maxmind_key )
|
||||
$maxMind->setTransaction( $transaction );
|
||||
}
|
||||
|
||||
$transaction->checkFraudRulesAndCapture( $maxMind );
|
||||
$memberJustCreated = $transaction->checkFraudRulesAndCapture( $maxMind );
|
||||
$transaction->sendNotification();
|
||||
\IPS\Session::i()->setMember( $transaction->invoice->member ); // This is in case the checkout was a guest, meaning checkFraudRulesAndCapture() may have just created an account. There is no security issue as we have just verified they were just bounced back from 2CheckOut
|
||||
|
||||
if ( $memberJustCreated )
|
||||
{
|
||||
\IPS\Session::i()->setMember( $memberJustCreated );
|
||||
}
|
||||
\IPS\Output::i()->redirect( $transaction->url() );
|
||||
@@ -44,7 +44,6 @@ try
|
||||
{
|
||||
$transaction->executeFraudAction( $fraudResult, FALSE );
|
||||
$transaction->sendNotification();
|
||||
\IPS\Session::i()->setMember( $transaction->invoice->member ); // This is in case the checkout was a guest, meaning checkFraudRulesAndCapture() may have just created an account. There is no security issue as we have just verified they were just bounced back from PayPal
|
||||
\IPS\Output::i()->redirect( $transaction->url() );
|
||||
}
|
||||
|
||||
@@ -96,15 +95,15 @@ try
|
||||
'invoice_title' => $transaction->invoice->title,
|
||||
) );
|
||||
|
||||
$transaction->approve();
|
||||
$memberJustCreated = $transaction->approve();
|
||||
if ( $memberJustCreated )
|
||||
{
|
||||
\IPS\Session::i()->setMember( $memberJustCreated );
|
||||
}
|
||||
}
|
||||
|
||||
$transaction->sendNotification();
|
||||
|
||||
if ( $transaction->invoice->member->member_id )
|
||||
{
|
||||
\IPS\Session::i()->setMember( $transaction->invoice->member );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->redirect( $transaction->url() );
|
||||
}
|
||||
}
|
||||
@@ -141,16 +140,14 @@ try
|
||||
}
|
||||
if ( !$fraudResult or $fraudResult === \IPS\nexus\Transaction::STATUS_PAID )
|
||||
{
|
||||
$transaction->captureAndApprove();
|
||||
$memberJustCreated = $transaction->captureAndApprove();
|
||||
if ( $memberJustCreated )
|
||||
{
|
||||
\IPS\Session::i()->setMember( $memberJustCreated );
|
||||
}
|
||||
}
|
||||
$transaction->sendNotification();
|
||||
|
||||
/* If we checked out as a guest, and captureAndApprove() created an account, we need to log them in. There is no security issue as we have just verified they were just bounced back from PayPal */
|
||||
if ( $transaction->invoice->member->member_id )
|
||||
{
|
||||
\IPS\Session::i()->setMember( $transaction->invoice->member );
|
||||
}
|
||||
|
||||
/* Redirect */
|
||||
\IPS\Output::i()->redirect( $transaction->url() );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user