33 lines
822 B
PHP
33 lines
822 B
PHP
|
|
<?php
|
||
|
|
/**
|
||
|
|
* SMS Provider Interface
|
||
|
|
*
|
||
|
|
* Interface for SMS providers (Twilio, Amazon SNS, etc.)
|
||
|
|
*/
|
||
|
|
interface TWP_SMS_Provider {
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Send an SMS message
|
||
|
|
*
|
||
|
|
* @param string $to_number Recipient phone number (E.164 format)
|
||
|
|
* @param string $message Message body
|
||
|
|
* @param string $from_number Sender phone number (E.164 format)
|
||
|
|
* @return array Response array with 'success' and 'data' or 'error'
|
||
|
|
*/
|
||
|
|
public function send_sms($to_number, $message, $from_number = null);
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Get provider name
|
||
|
|
*
|
||
|
|
* @return string Provider name
|
||
|
|
*/
|
||
|
|
public function get_provider_name();
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Validate provider configuration
|
||
|
|
*
|
||
|
|
* @return array Response array with 'success' and 'message' or 'error'
|
||
|
|
*/
|
||
|
|
public function validate_configuration();
|
||
|
|
}
|