sanketr43

Mobile verification for signer SMS issue

0 votes
Hello, I have added signer SMS verification before sign of document. It show SMS sent. but user don't receive any SMS. even if user request SMS while sign, it say SMS sent successfully, but don't get any SMS. Here is the code. There is line of array for SMS. Is it like any Mobile format validation to follow to save mobile number? or below code need any addition.? please help.
public function buildPackage($application_id)

	{



		$application = Application::find($application_id);

		$title 		 = $application->entity_name.' - '.date('d-m-Y');


		$roles 		 = array();

		$i = 1;

		//directors signers  (ID: Signer1 & Signer2)

		if(!empty($application->directors)){

			foreach (unserialize($application->directors) as $key => $value) {

				if(!empty($value['email'])){

					if(isset($value['mobile'])){
						$auth = array( 'challenges' => array(array('question' => $value['mobile'])),  'scheme' => 'SMS' );
					}else{
						$auth = array( 'challenges' => array(),  'scheme' => 'NONE' );
					}


	                $roles[] = array(

	                                'id' => 'Signer'.$i,

	                                'type' => 'SIGNER',

	                                'signers' => array(

	                                    array(

	                                    	'auth' 		=> $auth,

	                                        'email' 	=> trim($value['email']),

	                                        'firstName' => trim($value['f_name']),

	                                        'lastName' 	=> trim($value['l_name']),

	                                        'id' 		=> 'Signer'.$i,

	                                    )

	                                ) ,

	                            );

	                $i++;

	            }

			}

		}

		//senders notification alert users
		if(!empty(Auth::user()->company->doc_alert_mail)){
			
			$alert_emails = explode(',', Auth::user()->company->doc_alert_mail);

       		foreach ($alert_emails as $key => $value) {

       			//if there is supplier email skip as already added
		        if(Auth::user()->email == trim($value)){
		            continue;
		        }

		        //get email username
		        $email_explode = explode('@', $value);

       			$roles[] = array(

	                'id' => 'Sender'.$key,

	                'type' => 'SIGNER',

	                'signers' => array(

	                    array(

	                        'email' 	=> $value,

	                        'firstName' => $email_explode[0],

	                        'lastName' 	=> '.',

	                        'id' => 'Sender'.$key,

	                    )

	                ) ,

	            );
       		}
		}




		$build = array(
			'autocomplete' => true,

			'type' 	   => 'PACKAGE',

			'status'   => 'DRAFT',

			'roles'    => $roles,

			'name' 	   => $title,

		);



		$packageJSON = json_encode($build);
		$packageId = json_decode($this->sendRequest($this->packageAppend, $packageJSON, NULL, NULL), true);
		return $packageId;

	}

Reply to: Mobile verification for signer SMS issue

0 votes
Hi there, For the first glance, your code looks good to me. And for the phone number format, if your signer is located in North America, it should be +1{phone number}. (a Montreal phone number could be +15145718888) if outside North America, from my knowledge, it should be +{country code}{phone number with format/placeholder OSS are using and remove the first 0} Please share your scenario and we can look at the issue together! Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Mobile verification for signer SMS issue

0 votes
hello, I tried using this code, but it don't send any SMS. even I tried from backend, for the document that is created by REST API. But still it don't send anything. I checked editing from, it gets number correctly in the form with correct country code. But not sending SMS, why? We have Business Package account for AUS region. I am testing now, with my INDIA number as I am developer. So, why its not sending SMS? it show SMS sent successfully.

Reply to: Mobile verification for signer SMS issue

0 votes
Hi Sanket, Can you go to your web portal and create a test package from your dashboard? You can set Signer's SMS Authentication by click the gear icon as the attachment shows. If this works, you can retrieve package's metadata and know what's the format OSS set. Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Attachments
1-23-1.png44.11 KB

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off