Paypal IPN for trial Subscription how can I do it?

Discussion in 'PHP' started by PinoyIto, May 30, 2009.

  1. #1
    Currently I have an IPN script that works fine with, but my problem now how I can implement my script to work for a trial subscription.

    For example, I will give 5 day trial to my new members for free, after 5 days it will automatically update the subscription to full membership.

    How can I do that in my current IPN script, I really appreciate any help or link for an example.

    here is my current code

    
    
    if ($txn_type == "subscr_signup"  ||  $txn_type == "subscr_payment") {
          // insert subscriber payment info into paypal table
    
       if($payment_status=="Completed") {
    	
               //Approve the members account
            
                                                                }
     
        }
    	
    else if ($txn_type =="subscr_cancel" || $txn_type =="subscr_eot"){
    
    
    //Cancel membership and update it to free member only or expired
           
    	 }
       
    
    
    Code (markup):
     
    PinoyIto, May 30, 2009 IP