diff --git a/src/Concerns/ManagesCustomer.php b/src/Concerns/ManagesCustomer.php index c241221..b06aa11 100644 --- a/src/Concerns/ManagesCustomer.php +++ b/src/Concerns/ManagesCustomer.php @@ -45,6 +45,10 @@ public function createAsCustomer(array $options = []) $response = Cashier::api('POST', 'customers', $options)['data']; } + if (is_null($response['name'])) { + throw new LogicException("The Paddle customer [{$response['id']}] has no name. You may need to set the name of the customer in the Paddle dasbhboard."); + } + if (Cashier::$customerModel::where('paddle_id', $response['id'])->exists()) { throw new LogicException("The Paddle customer [{$response['id']}] already exists in the database."); }