Skip to content

Commit 71120cb

Browse files
authored
Fixed resend & verify otp
Arsg corrected as per msg91 docs.
1 parent 80de168 commit 71120cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/LaravelMsg91.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public function verifyOtp($recipient, $otp, $opts=[]){
179179
if(isset($opts['raw']) && $opts['raw'] == true){
180180
return json_decode($response->getBody());
181181
} else {
182-
return json_decode($response->getBody())->msgType == 'success' ? true : false;
182+
return json_decode($response->getBody())->type == 'success' ? true : false;
183183
}
184184
}
185185

@@ -197,7 +197,7 @@ public function resendOtp($recipient,$type='text'){
197197
throw new \Exception('Phone number should be digits only');
198198

199199
$data['mobile'] = $recipient;
200-
$data['type'] = $type;
200+
$data['retrytype'] = $type;
201201

202202
$data['authkey'] = $this->auth_key;
203203
$response = $this->guzzle->get('retryotp.php', ['query' =>$data]);

0 commit comments

Comments
 (0)