Jump to content

lobas

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

lobas's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, Been doing a lot of reading on the when and how the subscr_eot works yet their seems to be many contradictions and if's and but's involved not to mention a lot of the documentation/ discussions seem to range between 2009- 2010. I am working with the paypal sandbox + IPN. 1 buyer/ 1 seller both created within the last few days. When checking my buyers profile it starts with an I. The form submits and should be recurring on a daily basis (which shows up correctly when I log into the account and look at the history): <input type="hidden" name="t3" value="D"> <input type="hidden" name="p3" value="1"> When I create a new recurring payment I get: subscr_payment - GREAT When I cancel the recurring payment 5 minutes later i get: subscr_cancel - GREAT This is where I have problems. What I would like is some kind of notification from paypal at the end of the period,which happens to be a day in this example (but will be a year once ive got it all working). Now from what ive read some people say the feature was removed but then reinstated. Others say you need a profile with a certain ID. If it begins with 'I' then if the user cancels you will never get EOT. If its S and someone cancels you will still get it at the end of the time period (the latter sounds like what I need). Others then also said to check against the recurring_payment_expired as well as the subscr_eot so I have the following php snippet: elseif($txn_type == 'subscr_eot' || $txn_type == "recurring_payment_expired"){ //do something } The above code does NOT return anything after the user cancels. Now my first question is: With the current system in place for both live and sandbox with a new paypal account that creates profiles that start with an 'I' can i recieve any kind of notification which could then be used to check and reset a users account if they had set up a recurring payment but then cancelled before the end of the time period? The second question is, if the above is not possible is it possible to change sandbox and live accounts so they use the S profile so that I can make use of the actual EOT when a user cancels? This is of course assuming that the logic behind 'I' and 'S' still exists or has this now changed? If the above cannot be done is their anything that paypal sends or does that can help tackle the problem. Ideally I would like to refrain from capturing the recurring payment start date and then run soemthing like a cron job which has to regularly compare dates and act accordingly. Id like to contain the system as much as possible not to mention checking a very large number of records which will be continually growing on a daily basis seems very wasteful. Finally if their is no way whatsoever for me to do this via the IPN and I have to resport to doing it on my server please can you share why this feature was removed/ modified etc? Also is their any chance it will be enabled again and when? Would be great to have some upto date information on the actual process as well. Thanks for reading, apologies for the essay. Just want to get some upto date information which im sure will help a lot of peoople including myself.
  2. I have this script in php which gives me this error, this script checks google for page rank of a site, it works if i run this in xampp on localhost but not on my webhost, this is the error: toolbarqueries.google.com Warning: file(http://toolbarqueries.google.com/search?client=navclient-auto&ch=61146224719&features=Rank&q=info:http://site.com) [function.file]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in /home/lobas/public_html/check-pagerank/footer.php on line 116 [code]<?php /*     This code is released unto the public domain         This code was modified by Andrew Smith (http://o.thisdomainwasfree.com) */ //Configuration // You can add or remove data centres here $DataCentres=array('toolbarqueries.google.com','64.233.161.99','64.233.167.99','64.233.179.99','66.102.7.99','66.102.9.99','66.102.11.99','72.14.207.99','216.239.37.99','216.239.39.99','216.239.53.99','216.239.57.99','216.239.59.99'); ?> <HTML> <HEAD> <TITLE> Page Rank Checker </TITLE> <STYLE TYPE="text/css"> BODY,TABLE {     font-family: Verdana;     font-size: 11px; } </STYLE> <BODY> <div align="center"> <h1>Page Rank Checker</h1> <?php define('GOOGLE_MAGIC', 0xE6359A60); //unsigned shift right function zeroFill($a, $b) {     $z = hexdec(80000000);         if ($z & $a)         {             $a = ($a>>1);             $a &= (~$z);             $a |= 0x40000000;             $a = ($a>>($b-1));         }         else         {             $a = ($a>>$b);         }         return $a; } function mix($a,$b,$c) {   $a -= $b; $a -= $c; $a ^= (zeroFill($c,13));   $b -= $c; $b -= $a; $b ^= ($a<<8);   $c -= $a; $c -= $b; $c ^= (zeroFill($b,13));   $a -= $b; $a -= $c; $a ^= (zeroFill($c,12));   $b -= $c; $b -= $a; $b ^= ($a<<16);   $c -= $a; $c -= $b; $c ^= (zeroFill($b,5));   $a -= $b; $a -= $c; $a ^= (zeroFill($c,3));    $b -= $c; $b -= $a; $b ^= ($a<<10);   $c -= $a; $c -= $b; $c ^= (zeroFill($b,15));     return array($a,$b,$c); } function GoogleCH($url, $length=null, $init=GOOGLE_MAGIC) {     if(is_null($length)) {         $length = sizeof($url);     }     $a = $b = 0x9E3779B9;     $c = $init;     $k = 0;     $len = $length;     while($len >= 12) {         $a += ($url[$k+0] +($url[$k+1]<<8) +($url[$k+2]<<16) +($url[$k+3]<<24));         $b += ($url[$k+4] +($url[$k+5]<<8) +($url[$k+6]<<16) +($url[$k+7]<<24));         $c += ($url[$k+8] +($url[$k+9]<<8) +($url[$k+10]<<16)+($url[$k+11]<<24));         $mix = mix($a,$b,$c);         $a = $mix[0]; $b = $mix[1]; $c = $mix[2];         $k += 12;         $len -= 12;     }     $c += $length;     switch($len)              /* all the case statements fall through */     {         case 11: $c+=($url[$k+10]<<24);         case 10: $c+=($url[$k+9]<<16);         case 9 : $c+=($url[$k+8]<<8);           /* the first byte of c is reserved for the length */         case 8 : $b+=($url[$k+7]<<24);         case 7 : $b+=($url[$k+6]<<16);         case 6 : $b+=($url[$k+5]<<8);         case 5 : $b+=($url[$k+4]);         case 4 : $a+=($url[$k+3]<<24);         case 3 : $a+=($url[$k+2]<<16);         case 2 : $a+=($url[$k+1]<<8);         case 1 : $a+=($url[$k+0]);         /* case 0: nothing left to add */     }     $mix = mix($a,$b,$c);     /*-------------------------------------------- report the result */     return $mix[2]; } //converts a string into an array of integers containing the numeric value of the char function strord($string) {     for($i=0;$i<strlen($string);$i++) {         $result[$i] = ord($string{$i});     }     return $result; } function getrank($url,$dc) { $url = 'info:'.$url; $ch = GoogleCH(strord($url)); $file = "http://".$dc."/search?client=navclient-auto&ch=6$ch&features=Rank&q=$url"; $data = file($file); $rankarray = explode (':', $data[2]); $rank = $rankarray[2]; return $rank; } ?> <form action="" method="POST"> URL: <input type="text" name="url" /><input type="submit" value="rank" /> </form> <br /> <?php if($_POST['url']) {     ?>     <table border="0" cellspacing="1" cellpadding="3" align="center" width="300">     <tr bgcolor="#EEEEEE"><td align="center" width="200"><b>Data Centre</b></td><td colspan="2" width="100" align="center"><b>Page Rank</b></td></tr>     <?Php         if(substr($_POST['url'],0,7)!="http://") { $url="http://".$_POST['url']; } else { $url=$_POST['url']; }           foreach($DataCentres as $dc)     {             ?>         <tr><td><?php echo $dc; ?></td><td align='center'><?php echo getrank($url,$dc); ?></td></tr>         <?php     }     ?>     </table>     <?php } else {     ?>         <?php } ?> <!-- It would be nice if you left this link back in, but you don't have to :)--> <p style="font-size: 9px;">Created by <a href="http://o.thisdomainwasfree.com">Andrew Smith</a></p> </div> </BODY> </HTML>[/code]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.