public function getLoginvalidate() { $input = Xmlicash::loginvalidate(Input::all()); $data = Icash::registerkyc($input); $output = Xmltoarray::arr($data); //print_r($output); $city = $output['SOAP:ENVELOPE']['SOAP:BODY']['LOGIN_V2RESPONSE']['LOGIN_V2RESULT']; $output1 = Xmltoarray::arr($city); //print_r($output1); exit; if ($output1['LOGIN_V2RESPONSE']['STATUSCODE'] == 0) { if ($output1['LOGIN_V2RESPONSE']['OTPSTATUS'] == 0) { Session::put('cardno', $output1['LOGIN_V2RESPONSE']['CARDNO']); Session::put('security_key', $output1['LOGIN_V2RESPONSE']['SECURITYKEY']); Session::put('NAME', $output1['LOGIN_V2RESPONSE']['NAME']); Session::put('MIDDLENAME', $output1['LOGIN_V2RESPONSE']['MIDDLENAME']); Session::put('LASTNAME', $output1['LOGIN_V2RESPONSE']['LASTNAME']); Session::put('DOB', $output1['LOGIN_V2RESPONSE']['DOB']); Session::put('EMAILID', $output1['LOGIN_V2RESPONSE']['EMAILID']); Session::put('PINCODE', $output1['LOGIN_V2RESPONSE']['PINCODE']); Session::put('ADDRESS', $output1['LOGIN_V2RESPONSE']['ADDRESS']); Session::put('CITY', $output1['LOGIN_V2RESPONSE']['CITY']); Session::put('STATE', $output1['LOGIN_V2RESPONSE']['STATE']); Session::put('BALANCE', $output1['LOGIN_V2RESPONSE']['BALANCE']); Session::put('MOBILE', $output1['LOGIN_V2RESPONSE']['MOBILE']); Session::put('MOTHERMAIDENNAME', $output1['LOGIN_V2RESPONSE']['MOTHERMAIDENNAME']); Session::put('TRANSACTIONLIMIT', $output1['LOGIN_V2RESPONSE']['TRANSACTIONLIMIT']); Session::put('MMID', $output1['LOGIN_V2RESPONSE']['MMID']); Session::put('KYCSTATUS', $output1['LOGIN_V2RESPONSE']['KYCSTATUS']); //print_r($output1); exit; return Redirect::to('retailer/icash/manage')->with('success', 'user Logged in Successfully'); } else { return View::make('retailer.icashcard.loginotp')->with('mobilenumber', Input::get('mobilenumber')); } } elseif ($output1['LOGIN_V2RESPONSE']['STATUSCODE'] == 20) { $input = Xmlicash::registerotp($output1['LOGIN_V2RESPONSE']['STATUS']); //print_r($input); $data = Icash::registerkyc($input); $output = Xmltoarray::arr($data); //print_r($output); //exit; $city = $output['SOAP:ENVELOPE']['SOAP:BODY']['SENDERRESENDOTPRESPONSE']['SENDERRESENDOTPRESULT']; $output2 = Xmltoarray::arr($city); //print_r($output2); exit; if ($output2['SENDERRESENDOTPRESPONSE']['STATUSCODE'] == 0) { return View::make('retailer.icashcard.otpregister')->with('transactionid', $output1['LOGIN_V2RESPONSE']['STATUS']); } else { return View::make('retailer.icashcard.login')->with('failure', 'Sorry please try again later'); } } elseif ($output1['LOGIN_V2RESPONSE']['STATUSCODE'] == 21) { return Redirect::to('retailer/icash')->with('failure', $output1['LOGIN_V2RESPONSE']['STATUS']); } else { return Redirect::to('retailer/icash/login')->with('failure', $output1['LOGIN_V2RESPONSE']['STATUS']); } }