|
|
@@ -82,11 +82,17 @@ class TillerClientV2 implements TillerClientInterface |
|
|
|
|
|
|
|
public function postOrder($params) |
|
|
|
{ |
|
|
|
return $this->curl->setPostParams( |
|
|
|
array_merge([ |
|
|
|
'provider_token' => $this->providerToken, |
|
|
|
'restaurant_token' => $this->restaurantToken, |
|
|
|
], $params) |
|
|
|
)->post($this->urlApi . 'orders'); |
|
|
|
$params = array_merge([ |
|
|
|
'provider_token' => $this->providerToken, |
|
|
|
'restaurant_token' => $this->restaurantToken, |
|
|
|
], $params); |
|
|
|
|
|
|
|
\Yii::$app->mailerService->sendAdmin('Log post order SumUp', 'contact', [ |
|
|
|
'name' => 'Souke', |
|
|
|
'email' => 'contact@souke.fr', |
|
|
|
'content' => json_encode($params) |
|
|
|
]); |
|
|
|
|
|
|
|
return $this->curl->setPostParams($params)->post($this->urlApi . 'orders'); |
|
|
|
} |
|
|
|
} |