Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.

Commit be75f34

Browse files
committed
validation case modify
1 parent 65820a5 commit be75f34

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

src/BulkSmsBd.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,15 @@ private function validateResponse($response)
252252
switch ((string) $response->response_code) {
253253
case 202:
254254
return $response;
255+
case 1001:
256+
$this->logError('Validation Error', $response);
257+
throw new \Exception('Invalid Number', 1001);
255258
case 1002:
256259
$this->logError('Validation Error', $response);
257260
throw new \Exception('Sender Id/Masking Not Found', 1002);
258261
case 1003:
259262
$this->logError('Validation Error', $response);
260-
throw new \Exception('API Not Found', 1003);
263+
throw new \Exception('Please Required all fields/Contact Your System Administrator', 1003);
261264
case 1004:
262265
$this->logError('Validation Error', $response);
263266
throw new \Exception('SPAM Detected', 1004);
@@ -266,7 +269,7 @@ private function validateResponse($response)
266269
throw new \Exception('Internal Error', 1005);
267270
case 1006:
268271
$this->logError('Validation Error', $response);
269-
throw new \Exception('Internal Error', 1006);
272+
throw new \Exception('Balance Validity Not Available', 1006);
270273
case 1007:
271274
$this->logError('Validation Error', $response);
272275
throw new \Exception('Balance Insufficient', 1007);
@@ -284,13 +287,13 @@ private function validateResponse($response)
284287
throw new \Exception('Invalid User Id', 1011);
285288
case 1012:
286289
$this->logError('Validation Error', $response);
287-
throw new \Exception('Invalid Number', 1012);
290+
throw new \Exception('Masking SMS must be sent in Bengali', 1012);
288291
case 1013:
289292
$this->logError('Validation Error', $response);
290-
throw new \Exception('API limit error', 1013);
293+
throw new \Exception('Sender Id has not found Gateway by api key', 1013);
291294
case 1014:
292295
$this->logError('Validation Error', $response);
293-
throw new \Exception('No matching template', 1014);
296+
throw new \Exception('Sender Type Name not found using this sender by api key', 1014);
294297
case 1015:
295298
$this->logError('Validation Error', $response);
296299
throw new \Exception('Sender Id has not found Any Valid Gateway by api key', 1015);
@@ -312,6 +315,12 @@ private function validateResponse($response)
312315
case 1021:
313316
$this->logError('Validation Error', $response);
314317
throw new \Exception('The parent active (sender type name) price of this account is not found.', 1021);
318+
case 1031:
319+
$this->logError('Validation Error', $response);
320+
throw new \Exception('Your Account Not Verified, Please Contact Administrator.', 1031);
321+
case 1032:
322+
$this->logError('Validation Error', $response);
323+
throw new \Exception('IP Not Whitelisted', 1032);
315324
default:
316325
$this->logError('Validation Error', $response);
317326
throw new \Exception('Unknown', -1);

0 commit comments

Comments
 (0)