public function postCreate() { if (Input::get('kyc') == "2") { //Session::put('user_name','rttest'); $idproof = Input::file('Idproof'); $addrproof = Input::file('addrproof'); if ($idproof && $addrproof) { $date = getdate(); $filename = $date[0] . $idproof->getClientOriginalName(); echo $filename; $destinationPath = './assets/idproof/'; $uploadSuccess = $idproof->move($destinationPath, $filename); $addressname = $date[0] . $addrproof->getClientOriginalName(); //echo $filename; $destinationPath = './assets/addrproof/'; $uploadSuccess = $addrproof->move($destinationPath, $addressname); $idpath = url('assets/idproof/' . $filename); echo $idpath; //exit; $addrpath = url('assets/addrproof/' . $addressname); //echo $addrpath; exit; $input = Xmlicash::registerkyc(Input::get(), $idpath, $addrpath); if ($jsonresult && $jsonresult->status == "1") { $input = Xmlicash::registerotp($jsonresult->tranid); //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['REGISTRATIONRESPONSE']['STATUS']); } else { return View::make('retailer.icashcard.addview')->with('failure', "sorry., try again later"); } } else { $data = Icash::registerkyc($input); $output = Xmltoarray::arr($data); //print_r($output); exit; $city = $output['SOAP:ENVELOPE']['SOAP:BODY']['REGISTRATIONRESPONSE']['REGISTRATIONRESULT']; $output1 = Xmltoarray::arr($city); //print_r($output); exit; if ($output1['REGISTRATIONRESPONSE']['STATUSCODE'] == 0) { return View::make('retailer.icashcard.otpregister')->with('transactionid', $output1['REGISTRATIONRESPONSE']['TRANSACTIONID']); } elseif ($output1['REGISTRATIONRESPONSE']['STATUSCODE'] == 20) { $input = Xmlicash::registerotp($output1['REGISTRATIONRESPONSE']['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['REGISTRATIONRESPONSE']['STATUS']); } else { return View::make('retailer.icashcard.addview')->with('failure', "sorry., try again later"); } } else { return Redirect::to('retailer/icash')->with('failure', $output1['REGISTRATIONRESPONSE']['STATUS']); } } } } else { //print_r(Input::get('mobilenumber')); $input = Xmlicash::registernonkyc(Input::get()); //$jsoninput=Jsonicash::registernonkyc(Input::get()); //exit; //$jsonresult=Icash::registerkycjson($jsoninput); //print_r($jsonresult); exit; if ($jsonresult && $jsonresult->status == "1") { $input = Xmlicash::registerotp($jsonresult->tranid); //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['REGISTRATIONRESPONSE']['STATUS']); } else { return View::make('retailer.icashcard.addview')->with('failure', "sorry., try again later"); } } else { $data = Icash::registerkyc($input); $output = Xmltoarray::arr($data); //print_r($output); exit; $city = $output['SOAP:ENVELOPE']['SOAP:BODY']['REGISTRATIONRESPONSE']['REGISTRATIONRESULT']; $output1 = Xmltoarray::arr($city); //print_r($output); exit; if ($output1['REGISTRATIONRESPONSE']['STATUSCODE'] == 0) { return View::make('retailer.icashcard.otpregister')->with('transactionid', $output1['REGISTRATIONRESPONSE']['TRANSACTIONID']); } elseif ($output1['REGISTRATIONRESPONSE']['STATUSCODE'] == 20) { $input = Xmlicash::registerotp($output1['REGISTRATIONRESPONSE']['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['REGISTRATIONRESPONSE']['STATUS']); } else { return View::make('retailer.icashcard.addview')->with('failure', "sorry., try again later"); } } else { return Redirect::to('retailer/icash')->with('failure', $output['REGISTRATIONRESPONSE']['STATUS']); } } } }