MP_Addon_SMS_Callback::response_sms()
Callback function to response sms.
Source Source
File: calculator-sms-add-on/inc/MP_Addon_SMS_Callback.php
public function response_sms() {
$phone = MP_Settings::is_isset( $_POST['From'], null );
$body = MP_Settings::is_isset( $_POST['Body'] );
$post_id = $this->request_lead( $phone );
if ($post_id) {
var_dump($post_id);
$this->add_sms_message($post_id, $body);
MP_Logs::set_logs( $post_id, 'incoming_sms', ' from: ' . $phone );
update_metadata( 'post', $post_id, MortgagePlatform::$prefix . 'sms_status', true, '' );
$this->send_message_about_new_sms();
$this->send_thanks_message($post_id);
} else {
$this->send_thanks_message();
}
}
Changelog Changelog
| Version | Description |
|---|---|
| 1.0.0 | Introduced. |