/** * Execute the CURL HTTP POST request to aspsms server. Below a description of the different actions and their values/options: * * @see https://webservice.aspsms.com/aspsmsx2.asmx * @param string $action Contains the aspsms service defined action name like: CheckCredits, InquireDeliveryNotifications, SendTextSMS * @param array $values The values which needs to be passed to this action * @return string/mixed */ private function request($action, array $values = array()) { // build new AspsmsRequest-Object $request = new Request($this->server . $action, $this->prepareValues($values)); // transfer the request $response = $request->transfer(); // flush request class $request->flush(); // flush local settings $this->flush(); // return request response to its executed method return $response; }