Version 4.7.23
This commit is contained in:
1 parent
7124a02564
commit
25ddeb65d6
1791 files changed
+76990
-44452
No files matched your search
@@ -36,7 +36,19 @@ class _gatewayPending extends \IPS\Task
|
||||
*/
|
||||
public function execute()
|
||||
{
|
||||
$transactions = \IPS\Db::i()->select( '*', 'nexus_transactions', array( 't_status=?', \IPS\nexus\Transaction::STATUS_GATEWAY_PENDING ), 't_id ASC', 20 ); // We deliberately don't run until exhaustion here because we want to wait and try again later if it fails
|
||||
$paypalGateways = [];
|
||||
foreach( \IPS\nexus\Gateway::roots( null ) as $gateway )
|
||||
{
|
||||
if( $gateway instanceof \IPS\nexus\Gateway\PayPal )
|
||||
{
|
||||
$paypalGateways[] = $gateway->_id;
|
||||
}
|
||||
}
|
||||
|
||||
$transactions = \IPS\Db::i()->select( '*', 'nexus_transactions', array(
|
||||
array( 't_status=?', \IPS\nexus\Transaction::STATUS_GATEWAY_PENDING ),
|
||||
array( \IPS\Db::i()->in( 't_method', $paypalGateways ) )
|
||||
), 't_id ASC', 20 ); // We deliberately don't run until exhaustion here because we want to wait and try again later if it fails
|
||||
if ( !\count( $transactions ) )
|
||||
{
|
||||
$this->enabled = FALSE;
|
||||
|
||||
@@ -70,7 +70,7 @@ class _supportAutoresolve extends \IPS\Task
|
||||
{
|
||||
$fromEmail = $request->department->email ?: \IPS\Settings::i()->email_out;
|
||||
$email = \IPS\Email::buildFromTemplate( 'nexus', 'autoresolveWarning', array( $request, \IPS\DateTime::ts( $request->last_reply )->add( new \DateInterval( 'P' . \IPS\Settings::i()->nexus_autoresolve_days . 'D' ) ) ), \IPS\Email::TYPE_TRANSACTIONAL );
|
||||
$email->send( $request->email ?: $request->author(), array(), array(), $fromEmail, NULL, array( 'Message-Id' => "<IPS-000-SR{$request->id}.{$request->email_key}-{$fromEmail}>" ) );
|
||||
$email->send( $request->email ?: $request->author(), [], [], $fromEmail, NULL, [ 'Message-ID' => "<IPS-000-SR{$request->id}.{$request->email_key}-{$fromEmail}>" ] );
|
||||
|
||||
$request->ar_notify = TRUE;
|
||||
$request->save();
|
||||
|
||||
Reference in new issue
Block a user