Skip to content

Commit

Permalink
Fix gateway check and query status.
Browse files Browse the repository at this point in the history
  • Loading branch information
inpsyde-maticluznar committed Aug 2, 2023
1 parent bb82240 commit ca24145
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Payment/PaymentModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,14 @@ public function cancelOrderOnExpiryDate()
continue;
}
$heldDurationInSeconds = $heldDuration * 60;
if ($gateway === 'mollie_wc_gateway_bankTransfer') {
if ($gateway === 'Mollie_WC_Gateway_Banktransfer') {
$durationInHours = absint($heldDuration) * 24;
$durationInMinutes = $durationInHours * 60;
$heldDurationInSeconds = $durationInMinutes * 60;
}
$args = [
'limit' => -1,
'status' => 'pending',
'status' => ['wc-on-hold', 'wc-pending'],
'payment_method' => strtolower($gateway),
'date_modified' => '<' . (time() - $heldDurationInSeconds),
'return' => 'ids',
Expand Down

0 comments on commit ca24145

Please sign in to comment.