Skip to content

Instantly share code, notes, and snippets.

@hawz
Created June 16, 2016 08:31
Show Gist options
  • Save hawz/7f4055f01acd173e43b6daea79e9a584 to your computer and use it in GitHub Desktop.
Save hawz/7f4055f01acd173e43b6daea79e9a584 to your computer and use it in GitHub Desktop.
public function actionDcc_send_pin_vocal() {
$medium = $this->validateRequestByMedium();
if(!($medium == 'web_customer' || $medium == 'dealer')) {
Response::forbidden()->output();
die;
}
$input = file_get_contents('php://input');
$input = json_decode($input, true);
$id_pratica = @$input['id_pratica'];
$cf = @$input['cf'];
if ($this->isEmpty($id_pratica) || $this->isEmpty($cf)) {
$id_pratica = @$_REQUEST['id_pratica'];
$cf = @$_REQUEST['cf'];
}
if ($this->isEmpty($id_pratica) || $this->isEmpty($cf)) {
Response::bad_request()->output();
die;
}
$response = $this->api->dcc_send_pin_vocal($id_pratica, $cf, $medium);
$response->output();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment