nasagnilac Posted April 22, 2014 Group: Members Topic Count: 89 Topics Per Day: 0.02 Content Count: 232 Reputation: 15 Joined: 11/02/13 Last Seen: December 19, 2024 Share Posted April 22, 2014 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 Quote Link to comment Share on other sites More sharing options...
Question
nasagnilac
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
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.