Fix examples
This commit is contained in:
parent
a1aa7da86d
commit
5b1e5651e7
20
README.md
20
README.md
@ -42,6 +42,12 @@ if ($response->isSuccessful()) {
|
||||
// or
|
||||
// $order = $response->getOrder();
|
||||
// $order['totalSumm'];
|
||||
} else {
|
||||
echo sprintf(
|
||||
"Error of the order receipt: [Code %s] %s",
|
||||
$response->getStatusCode(),
|
||||
$response->getErrorMsg()
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
@ -69,9 +75,19 @@ try {
|
||||
echo "CRM connection error: " . $e->getMessage();
|
||||
}
|
||||
|
||||
if ($response->isSuccessful() && 201 === $response->getStatusCode()) {
|
||||
echo 'Order created successfully! Order ID in CRM - ' . $response->id;
|
||||
if ($response->isSuccessful()) {
|
||||
if (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",
|
||||
$response->getStatusCode(),
|
||||
$response->getErrorMsg()
|
||||
);
|
||||
}
|
||||
```
|
Loading…
Reference in New Issue
Block a user