Update Customer.php

This commit is contained in:
Bozhidar Slaveykov 2024-04-06 20:08:55 +03:00
parent 9026194cd4
commit 6de86e3c21

View file

@ -36,7 +36,16 @@ class Customer extends Model
$phyreApiSDK = new PhyreApiSDK($phyreServer->ip, 8443, $phyreServer->username, $phyreServer->password);
$createCustomer = $phyreApiSDK->createCustomer([
'name' => $model->name,
'email' => $model->email
'username' => $model->username,
'password' => $model->password,
'email' => $model->email,
'phone' => $model->phone,
'address' => $model->address,
'city' => $model->city,
'state' => $model->state,
'zip' => $model->zip,
'country' => $model->country,
'company' => $model->company,
]);
if (isset($createCustomer['data']['customer']['id'])) {
$model->external_id = $createCustomer['data']['customer']['id'];