Skip to content

Commit

Permalink
Refactored send() to improve code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsam726 committed Oct 6, 2020
1 parent b9c6ac1 commit 0b8bdd0
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions src/Advantasms.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,23 @@ public function message(string $message="") {
/**
* Execute sms sending action
* @return array|mixed
*/
*
* 200;Successful Request Call
* 1001;Invalid sender id
* 1002;Network not allowed
* 1003;Invalid mobile number
* 1004;Low bulk credits
* 1005;Failed. System error
* 1006;Invalid credentials
* 1007;Failed. System error
* 1008;No Delivery Report
* 1009;unsupported data type
* 1010;unsupported request type
* 4090;Internal Error. Try again after 5 minutes
* 4091;No Partner ID is Set
* 4092;No API KEY Provided
* 4093;Details Not Found
* */
public function send() {
$data = [
"apikey"=>$this->apikey,
Expand All @@ -69,23 +85,6 @@ public function send() {
"mobile"=>trim($this->to)
];
$response = $this->curlPost($this->sendsms,$data);
/*
200;Successful Request Call
1001;Invalid sender id
1002;Network not allowed
1003;Invalid mobile number
1004;Low bulk credits
1005;Failed. System error
1006;Invalid credentials
1007;Failed. System error
1008;No Delivery Report
1009;unsupported data type
1010;unsupported request type
4090;Internal Error. Try again after 5 minutes
4091;No Partner ID is Set
4092;No API KEY Provided
4093;Details Not Found
*/
$return = [
"success" => false,
"message" => "",
Expand Down

0 comments on commit 0b8bdd0

Please sign in to comment.