yms/validate.php
changeset 10 351d40b21cbc
parent 0 9997bee9ad03
--- a/yms/validate.php	Fri Apr 08 17:22:15 2016 -0400
+++ b/yms/validate.php	Fri Apr 08 17:23:16 2016 -0400
@@ -16,6 +16,12 @@
   {
     yms_send_reply('MISSING_PARAMETER', '', array('info' => 'otp'));
   }
+
+  $nonce = null;
+  if ( isset($_GET['nonce']) )
+  {
+    $nonce = $_GET['nonce'];
+  }
   
   // first, get API key so we can properly sign responses
   $id = intval($_GET['id']);
@@ -42,6 +48,6 @@
   
   $GLOBALS['g_api_key'] =& $g_api_key;
   
-  yms_send_reply(yms_validate_otp($_GET['otp'], $id));
+  yms_send_reply(yms_validate_otp($_GET['otp'], $id), '', array('nonce' => $nonce, 'otp' => $_GET['otp']));
 }