Jump to content
  • 0

Flux Donation Problem


nasagnilac

Question


  • Group:  Members
  • Topic Count:  89
  • Topics Per Day:  0.02
  • Content Count:  232
  • Reputation:   15
  • Joined:  11/02/13
  • Last Seen:  

	private function verify()
	{
		$qString  = 'cmd=_notify-validate&'.$this->ipnVarsToQueryString();
		$request  = "POST /cgi-bin/webscr HTTP/1.1\r\n";
		$request .= "Content-Type: application/x-www-form-urlencoded\r\n";
		$request .= 'Content-Length: '.strlen($qString)."\r\n";
		$request .= 'Host: '.$this->ppServer."\r\n";
		$request .= "Connection: close\r\n\r\n";
		$request .= $qString;

		$this->logPayPal('Query string: %s', $qString);
		$this->logPayPal('Establishing connection to PayPal server at %s:80...', $this->ppServer);

		$fp = @fsockopen($this->ppServer, 80, $errno, $errstr, 20);
		if (!$fp) {
			$this->logPayPal("Failed to connect to PayPal server: [%d] %s", $errno, $errstr);
			return false;
		}
		else {
			$this->logPayPal('Connected. Sending request back to PayPal...');

			// Send POST request just as PayPal sent it.

			$this->logPayPal('Sent %d bytes of transaction data. Request size: %d bytes.', strlen($qString), fputs($fp, $request));
			$this->logPayPal('Reading back response from PayPal...');
			
			// Read until EOF, last line contains VERIFIED or INVALID.
			$is_verified = false;
			while (!feof($fp)) {
				if ($line = trim(fgets($fp)) == 'VERIFIED'){$is_verified = true;};
			}

			// Close connection.
			fclose($fp);

			// Check verification status of the notify request.
			if ($is_verified == true) {
				$this->logPayPal('Notification verified. (recv: VERIFIED)');
				$this->txnIsValid = true;
				return true;
			}
			else {
				$this->logPayPal('Notification failed to verify. (recv: %s)', strtoupper($line));
				return false;
			}
		}
	}

Anyone can debug if this part is correct?

There's a scenario that when my players donate they not receive the credtis but I can receive their money..

Please help..

 

And maybe the main problem is this part

		$qString  = 'cmd=_notify-validate&'.$this->ipnVarsToQueryString();
		$request  = "POST /cgi-bin/webscr HTTP/1.1\r\n";
		$request .= "Content-Type: application/x-www-form-urlencoded\r\n";
		$request .= 'Content-Length: '.strlen($qString)."\r\n";
		$request .= 'Host: '.$this->ppServer."\r\n";
		$request .= "Connection: close\r\n\r\n";
		$request .= $qString;

Can you help me change this part if this is not existing anymore in paypal.com

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...