1 | <?php |
||
9 | class NetgsmOtpMessage extends AbstractNetgsmMessage |
||
10 | { |
||
11 | protected $url = 'https://api.netgsm.com.tr/sms/send/otp'; |
||
12 | |||
13 | protected $errorCodes = [ |
||
14 | '20' => CouldNotSendNotification::MESSAGE_TOO_LONG, |
||
15 | '30' => CouldNotSendNotification::CREDENTIALS_INCORRECT, |
||
16 | '40' => CouldNotSendNotification::SENDER_INCORRECT, |
||
17 | '50' => CouldNotSendNotification::RECEIVER_INCORRECT, |
||
18 | '60' => CouldNotSendNotification::OTP_ACCOUNT_NOT_DEFINED, |
||
19 | '70' => CouldNotSendNotification::PARAMETERS_INCORRECT, |
||
20 | '80' => CouldNotSendNotification::QUERY_LIMIT_EXCEED, |
||
21 | '100' => CouldNotSendNotification::SYSTEM_ERROR, |
||
22 | ]; |
||
23 | |||
24 | protected $fields = [ |
||
25 | 'usercode', |
||
26 | 'password', |
||
27 | 'msgheader', |
||
28 | 'msg', |
||
29 | 'no' |
||
30 | ]; |
||
31 | |||
32 | /** |
||
33 | * @return string |
||
34 | */ |
||
35 | protected function createXmlPost(): string |
||
56 | |||
57 | /** |
||
58 | * @return string |
||
59 | */ |
||
60 | public function getUrl(): string |
||
64 | |||
65 | /** |
||
66 | * @return array |
||
67 | */ |
||
68 | protected function mappers(): array |
||
78 | } |
||
79 |