Skip to content

Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️

Fix: Stripe type error (#850)

Dave Earley20af61f0c06e
diff --git a/backend/app/Services/Domain/Payment/Stripe/StripeAccountSyncService.php b/backend/app/Services/Domain/Payment/Stripe/StripeAccountSyncService.php
index 651f9f679..a8fbcb6c6 100644
--- a/backend/app/Services/Domain/Payment/Stripe/StripeAccountSyncService.php
+++ b/backend/app/Services/Domain/Payment/Stripe/StripeAccountSyncService.php
@@ -112,7 +112,11 @@ class StripeAccountSyncService
'charges_enabled' => $stripeAccount->charges_enabled,
'payouts_enabled' => $stripeAccount->payouts_enabled,
'country' => $stripeAccount->country,
- 'capabilities' => $stripeAccount->capabilities?->toArray(),
+ 'capabilities' => is_array($stripeAccount->capabilities)
+ ? $stripeAccount->capabilities
+ : ($stripeAccount->capabilities && method_exists($stripeAccount->capabilities, 'toArray')
+ ? $stripeAccount->capabilities->toArray()
+ : null),
'type' => $stripeAccount->type,
'business_type' => $stripeAccount->business_type,
'requirements' => [