Other PAYPAL 303 and Rifle error

Discussion in 'Software' started by xarzu, 24 May 2014.

  1. xarzu

    xarzu What's a Dremel?

    Joined:
    13 Apr 2007
    Posts:
    11
    Likes Received:
    0
    What causes a 303 error when I make a call on my website to paypal?

    Here is a snapshot of the message:
    http://www.arguemax.com/images/problems/5-21-2014/Capture_02.PNG

    Watch this new video I made with Ezvid:
    http://youtu.be/728GYPBLYhU

    A look at the php code tracks the problem down to this function and "failed with code: {$result[0]} - {$result[1]}" is where the message "failed with code: 303 - rifle" comes from. Can anyone suggest how I can debug this?
    Code:
    	private function process_request($data)
    	{
    		global $config;
    
    		$request = new HTTPRequest($this->host, $this->endpoint, 'POST', $config['pp_paypal_secure']);
    		$data['USER']		= $config['pp_paypal'.($config['pp_paypal_use_sandbox'] ? '_sandbox_' : '_').'API_username'];
    		$data['PWD']		= $config['pp_paypal'.($config['pp_paypal_use_sandbox'] ? '_sandbox_' : '_').'API_password'];
    		$data['SIGNATURE']	= $config['pp_paypal'.($config['pp_paypal_use_sandbox'] ? '_sandbox_' : '_').'API_signature'];
    
    		$temp = http_build_query($data);
    		$result = $request->connect($temp);
    		$return=false;
    		if (is_array($result))
    		{
    			$this->last_error = "failed with code: {$result[0]} - {$result[1]}";
    		}
    		elseif ($result<400)
    		{
    	  		$response = $request->get_content();
    
    			parse_str($response, $this->EC_data);
    //			$this->write_results($this->paypal_vars['METHOD'] . ' process request returned = ' . $this->EC_data['ACK']);
    			if ($this->EC_data['ACK'] == 'Success')
    			{
    				$return=true;
    			}
    			else
    			{
    				$this->last_error = 'Failed Validation';
    			}
    		}
    		else
    		{
    			$this->last_error = "failed with code: {$result}";
    		}
    		return $return;
    	}
     

Share This Page