Subversion Repositories SmartDukaan

Rev

Rev 18633 | Rev 18699 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 18633 Rev 18662
Line 350... Line 350...
350
		
350
		
351
		return $checkestimate;
351
		return $checkestimate;
352
	}
352
	}
353
	
353
	
354
	 public function checkout(){
354
	 public function checkout(){
355
	 	$addressid = json_decode($this->request->data['addressid']);
355
	 	$addressid = $this->request->data['addressid'];
356
	 	$pincode = 0;
356
	 	$pincode = 0;
357
		$cod = $this->request->query('cod');
357
		$cod = $this->request->query('cod');
358
		$userId = $this->request->query('user_id');
358
		$userId = $this->request->query('user_id');
359
		
359
		
360
		//Added token validation to ensure only user 
360
		//Added token validation to ensure only user 
Line 445... Line 445...
445
				$redirectUrl = $this->getAutoLoginUrl($userId,$next);
445
				$redirectUrl = $this->getAutoLoginUrl($userId,$next);
446
				$this->log($redirectUrl,'headers');
446
				$this->log($redirectUrl,'headers');
447
				$this->set(compact('redirectUrl','next'));
447
				$this->set(compact('redirectUrl','next'));
448
			}else{
448
			}else{
449
				$dataGiven = json_decode($this->request->data['cart_details']);
449
				$dataGiven = json_decode($this->request->data['cart_details']);
450
				$payMethod = json_decode($this->request->data['paymethod']);
450
				$payMethod = $this->request->data['paymethod'];
451
				if(isset($payMethod) && $payMethod=='cap_float'){
451
				if(isset($payMethod) && $payMethod=='cap_float'){
452
					$url = Configure::read('saholicapihost').'order?payment_option=456789&isLoggedIn=true&privateDealUser=true&userId='.$suserId.'&id='.$scartId.'&email='.$semailId.'&addressid='.$addressid;
452
					$url = Configure::read('saholicapihost').'order?payment_option=456789&isLoggedIn=true&privateDealUser=true&userId='.$suserId.'&id='.$scartId.'&email='.$semailId.'&addressid='.$addressid;
453
				 	if($pincode!='0'){
453
				 	if($pincode!='0'){
454
						$url = $url.'&pinCode='.$pincode;
454
						$url = $url.'&pinCode='.$pincode;
455
					}
455
					}