timelf123
Jun 19th 2007, 12:57 pm
I am currently using Telesign (www.telesign.com) for phone verification and antifraud on a freebie site I administer.
Currently, I have code that allows a "user" to input their phone number into a form, which then posts to a php file that uses SOAP to tell telesign to call them. They get a verification code, and then they need to enter that code in on the page that the form was posted to, which then posts to a status page to check the code.
Confusing!
Here is what it looks like:
Form on order page-->telesign.php(calls user and gives from for code)-->posts to the status page, which returns the result of the query (this will eventually be entered into a mysql DB, but for now, it goes to this page)
What I need to do is use AJAX or some other asynchronous type of language to send the request in the background, but I have no idea how to do it.
I want it to go like this:
Form on order page-->telesign.php using ajax
ajax posts the form and waits for the response.
ajax gets the response (a variable called the refid)
A box pops up and asks for the code
user enters code, and ajax passes it to the status file
if the user is verified, then it will be entered on mysql, and the verification form will not display anymore (I can do this with a PHP if)
This is brutal IK, but any tips are greatly appreciated!
Tim
Currently, I have code that allows a "user" to input their phone number into a form, which then posts to a php file that uses SOAP to tell telesign to call them. They get a verification code, and then they need to enter that code in on the page that the form was posted to, which then posts to a status page to check the code.
Confusing!
Here is what it looks like:
Form on order page-->telesign.php(calls user and gives from for code)-->posts to the status page, which returns the result of the query (this will eventually be entered into a mysql DB, but for now, it goes to this page)
What I need to do is use AJAX or some other asynchronous type of language to send the request in the background, but I have no idea how to do it.
I want it to go like this:
Form on order page-->telesign.php using ajax
ajax posts the form and waits for the response.
ajax gets the response (a variable called the refid)
A box pops up and asks for the code
user enters code, and ajax passes it to the status file
if the user is verified, then it will be entered on mysql, and the verification form will not display anymore (I can do this with a PHP if)
This is brutal IK, but any tips are greatly appreciated!
Tim