diff --git a/src/Http/Payload/CreateMandatePayload.php b/src/Http/Payload/CreateMandatePayload.php index fda0ccbf..db799c11 100644 --- a/src/Http/Payload/CreateMandatePayload.php +++ b/src/Http/Payload/CreateMandatePayload.php @@ -50,7 +50,7 @@ public function data(): array 'consumerAccount' => $this->consumerAccount, 'consumerBic' => $this->consumerBic, 'consumerEmail' => $this->consumerEmail, - 'signatureDate' => $this->signatureDate?->format('Y-m-d'), + 'signatureDate' => $this->signatureDate ? $this->signatureDate->format('Y-m-d') : null, 'mandateReference' => $this->mandateReference, 'paypalBillingAgreementId' => $this->paypalBillingAgreementId, ]; diff --git a/src/Http/Payload/CreatePaymentLinkPayload.php b/src/Http/Payload/CreatePaymentLinkPayload.php index c131c341..a66c62cf 100644 --- a/src/Http/Payload/CreatePaymentLinkPayload.php +++ b/src/Http/Payload/CreatePaymentLinkPayload.php @@ -47,7 +47,7 @@ public function data(): array 'webhookUrl' => $this->webhookUrl, 'profileId' => $this->profileId, 'reusable' => $this->reusable, - 'expiresAt' => $this->expiresAt?->format('Y-m-d'), + 'expiresAt' => $this->expiresAt ? $this->expiresAt->format('Y-m-d') : null, ]; } } diff --git a/src/Http/Payload/CreateSubscriptionPayload.php b/src/Http/Payload/CreateSubscriptionPayload.php index 648ba89a..49769e41 100644 --- a/src/Http/Payload/CreateSubscriptionPayload.php +++ b/src/Http/Payload/CreateSubscriptionPayload.php @@ -66,7 +66,7 @@ public function data(): array 'description' => $this->description, 'status' => $this->status, 'times' => $this->times, - 'startDate' => $this->startDate?->format('Y-m-d'), + 'startDate' => $this->startDate ? $this->startDate->format('Y-m-d') : null, 'method' => $this->method, 'applicationFee' => $this->applicationFee, 'metadata' => $this->metadata, diff --git a/src/Http/Payload/UpdateSubscriptionPayload.php b/src/Http/Payload/UpdateSubscriptionPayload.php index 76cb09ad..669f6cec 100644 --- a/src/Http/Payload/UpdateSubscriptionPayload.php +++ b/src/Http/Payload/UpdateSubscriptionPayload.php @@ -48,7 +48,7 @@ public function data(): array 'amount' => $this->amount, 'description' => $this->description, 'interval' => $this->interval, - 'startDate' => $this->startDate?->format('Y-m-d'), + 'startDate' => $this->startDate ? $this->startDate->format('Y-m-d') : null, 'times' => $this->times, 'metadata' => $this->metadata, 'webhookUrl' => $this->webhookUrl, diff --git a/src/Http/Query/GetAllMethodsQuery.php b/src/Http/Query/GetAllMethodsQuery.php index 85040dd5..00ef7495 100644 --- a/src/Http/Query/GetAllMethodsQuery.php +++ b/src/Http/Query/GetAllMethodsQuery.php @@ -35,7 +35,7 @@ public function toArray(): array $this->includePricing ? MethodQuery::INCLUDE_PRICING : null, ]), 'locale' => $this->locale, - 'amount' => $this->amount?->data(), + 'amount' => $this->amount ? $this->amount->data() : null, ]; } } diff --git a/src/Http/Query/GetEnabledPaymentMethodsQuery.php b/src/Http/Query/GetEnabledPaymentMethodsQuery.php index 90cc6f6d..b0f11d96 100644 --- a/src/Http/Query/GetEnabledPaymentMethodsQuery.php +++ b/src/Http/Query/GetEnabledPaymentMethodsQuery.php @@ -26,7 +26,7 @@ public function toArray(): array return [ 'sequenceType' => $this->sequenceType, 'locale' => $this->locale, - 'amount' => $this->amount?->data(), + 'amount' => $this->amount ? $this->amount->data() : null, 'resource' => $this->resource, 'billingCountry' => $this->billingCountry, 'includeWallets' => Arr::join($this->includeWallets ?? []),