TeknooSoftware / sellsy-client

PHP library to connect your applications to your Sellsy account account using the Sellsy API and build your websites and your platforms on the Sellsy technology.
https://teknoo.software/libraries/sellsy
MIT License
17 stars 16 forks source link

email is invalid when creating new client #15

Closed Ericdev89 closed 5 years ago

Ericdev89 commented 5 years ago

Im using the api to create a new client. but i got an exception that tells me the email is invalid and i dont know why ???? ` public function getSellsyApi() {

$guzzleClient = new \GuzzleHttp\Client();

 //Create the transport bridge
$transportBridge = new \Teknoo\Sellsy\Transport\Guzzle($guzzleClient);

 //Create the front object
  $sellsy = new \Teknoo\Sellsy\Sellsy(
  'https://apifeed.sellsy.com/0/',
  'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
  );

  $sellsy->setTransport($transportBridge);

  return $sellsy ;

}

public function createSellsyCustomer($params = [],$type = 'person') {

extract($params);
$fullName = "$lastname $firstname";

$sellsy = $this->getSellsyApi();
$Client = $sellsy->Client()
                 ->create(['third' => ['name' => $fullName,'type' => $type, 'tags' => 'Company','auxcode'  => 'Company'],
                           'contact' => ['name' => $lastname, 'forename' => $firstname,'email' => $email ],
                           'address' => $address
                          ])
                  ->getResponse();

return $Client;

}`

i got an error email is invalid the email is Madan062@company.com.

is there some restrictions on email on sellsy ?

thanks Sans titre

frenchcomp commented 5 years ago

Sorry, this library is independant. I does not work with Sellsy. I invite you to contact them directly.

aguerin commented 5 years ago

Hi @Ericdev89, I use this client too, and didn't have any trouble of creating a new client with the @mail you've indicated above

frenchcomp commented 5 years ago

Thanks for this feedback @aguerin :)

I close this issue because it is not related to this library.