1
0
mirror of synced 2024-11-25 06:46:07 +03:00
This commit is contained in:
Ilyas Salikhov 2014-11-07 11:25:11 +03:00
commit 8c029959e5

View File

@ -16,7 +16,7 @@ Installation
2) Run:
```bash
composer require retailcrm/api-client-php 3.0
composer require retailcrm/api-client-php ~3.0.0
```
Usage
@ -75,14 +75,10 @@ try {
echo "CRM connection error: " . $e->getMessage();
}
if ($response->isSuccessful()) {
if (201 === $response->getStatusCode()) {
if ($response->isSuccessful() && 201 === $response->getStatusCode()) {
echo 'Order created successfully! Order ID in CRM = ' . $response->id;
// or $response['id'];
// or $response->getId();
} else {
echo 'Order updated successfully!';
}
} else {
echo sprintf(
"Error of the order creating: [Code %s] %s",