Fixes for gocardless import customers

This commit is contained in:
David Bomba 2025-05-11 12:31:40 +10:00
parent 4d57d8c929
commit b31b8dbe50
1 changed files with 2 additions and 1 deletions

View File

@ -459,7 +459,8 @@ class GoCardlessPaymentDriver extends BaseDriver
$mandates = $this->gateway->mandates()->list(); $mandates = $this->gateway->mandates()->list();
foreach ($mandates->records as $mandate) { foreach ($mandates->records as $mandate) {
if ($customer->id != $mandate->links->customer || $mandate->status != 'active' || ClientGatewayToken::where('token', $mandate->id)->where('gateway_customer_reference', $customer->id)->exists()) { if ($customer->id != $mandate->links->customer || !in_array($mandate->status,['active', 'pending_submission']) || ClientGatewayToken::where('token', $mandate->id)->where('gateway_customer_reference', $customer->id)->exists()) {
// if ($customer->id != $mandate->links->customer || $mandate->status != 'active' || ClientGatewayToken::where('token', $mandate->id)->where('gateway_customer_reference', $customer->id)->exists()) {
continue; continue;
} }