null checks

This commit is contained in:
David Bomba 2024-03-25 12:30:08 +11:00
parent 7a10866d5f
commit c460287356

View File

@ -61,9 +61,9 @@ class CreditCard
'State' => $this->eway_driver->client->state, 'State' => $this->eway_driver->client->state,
'PostalCode' => $this->eway_driver->client->postal_code, 'PostalCode' => $this->eway_driver->client->postal_code,
'Country' => $this->eway_driver->client->country->iso_3166_2, 'Country' => $this->eway_driver->client->country->iso_3166_2,
'Phone' => $this->eway_driver->client->phone, 'Phone' => $this->eway_driver->client->phone ?? '',
'Email' => $this->eway_driver->client->contacts()->first()->email, 'Email' => $this->eway_driver->client->contacts()->first()->email ?? '',
'Url' => $this->eway_driver->client->website, 'Url' => $this->eway_driver->client->website ?? '',
'Method' => \Eway\Rapid\Enum\PaymentMethod::CREATE_TOKEN_CUSTOMER, 'Method' => \Eway\Rapid\Enum\PaymentMethod::CREATE_TOKEN_CUSTOMER,
'SecuredCardData' => $securefieldcode, 'SecuredCardData' => $securefieldcode,
]; ];