Check for valid bank account property before attempting to iterate
This commit is contained in:
parent
68ff176725
commit
5f3d48e189
1 changed files with 3 additions and 0 deletions
|
|
@ -74,6 +74,9 @@ class UpdatePaymentMethods
|
|||
{
|
||||
$sources = $customer->sources;
|
||||
|
||||
if(!property_exists($sources, 'data'))
|
||||
return;
|
||||
|
||||
foreach ($sources->data as $method) {
|
||||
$token_exists = ClientGatewayToken::where([
|
||||
'gateway_customer_reference' => $customer->id,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue