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;
|
||||
|
||||
Reference in new issue
Block a user