From 05a32d491dbb255ab65c77899b7b886b826b5a4f Mon Sep 17 00:00:00 2001 From: Jeffrey Lembeck Date: Wed, 19 Apr 2023 10:16:48 -0700 Subject: [PATCH] fix(account): make card brand have defaults --- .../ChargifyInvoicePaymentMethodType.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/www/src/CPGraphQlTypes/ChargifyInvoicePaymentMethodType.php b/www/src/CPGraphQlTypes/ChargifyInvoicePaymentMethodType.php index 061b5b8e80..f23219fc68 100644 --- a/www/src/CPGraphQlTypes/ChargifyInvoicePaymentMethodType.php +++ b/www/src/CPGraphQlTypes/ChargifyInvoicePaymentMethodType.php @@ -17,13 +17,13 @@ class ChargifyInvoicePaymentMethodType public function __construct(array $options) { - $this->details = $options['details']; - $this->kind = $options['kind']; - $this->memo = $options['memo']; - $this->type = $options['type']; - $this->card_brand = $options['cardBrand']; - $this->card_expiration = $options['cardExpiration']; - $this->masked_card_number = $options['maskedCardNumber']; + $this->details = $options['details'] ?? ""; + $this->kind = $options['kind'] ?? ""; + $this->memo = $options['memo'] ?? ""; + $this->type = $options['type'] ?? ""; + $this->card_brand = $options['cardBrand'] ?? ""; + $this->card_expiration = $options['cardExpiration'] ?? ""; + $this->masked_card_number = $options['maskedCardNumber'] ?? ""; $this->last_four = $options['lastFour'] ?? null; }