Paypal IPN Problem

Discussion in 'PHP' started by thankyou, Jun 25, 2011.

  1. #1
    Hi

    I have a script for Ipn. It is supposed to send email to my
    customer after purchasing. So it should collect some details
    of the customer.

    To see whether my script has bug,
    I tested the script by inputting dummy variables instead of the $_POST return.
    $custname = "NICK";
    $custemail = "email@email.com";
    $custaddress =  "Customer Address";
    $custzipcode = "Customer Zip";
    $address_country = "Customer Country";
    $payer_status = "Customer Status";
    $receiver_email = "anotheremail@email.com";
    $mc_currency = "US";
    $address_country_code = "Customer COUNTRY CODE";
    $payment_date= "Date Of Payment";
    $number_of_sales= "0";
    PHP:
    And it works.

    I receive emails (as a customer and as a seller). But when I put it in action, it didn't work.

    I have no clue why is it not working. Any help?
     
    thankyou, Jun 25, 2011 IP
  2. kalpsik

    kalpsik Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    can you show your script with $_POST variables?
     
    kalpsik, Jun 25, 2011 IP
  3. bogi

    bogi Well-Known Member

    Messages:
    482
    Likes Received:
    16
    Best Answers:
    2
    Trophy Points:
    140
    #3
    As you mentioned, you receive the email so I assume that it receives the notification from PayPal. The next step should be checking your $_POST variable. You can send it in email:

    
    
    //Setting second argument of print_r true allows you to return data instead of displaying it
    
    $post_sent_by_paypal = print_r($_POST, true); 
    
    
    PHP:
    If you can't find what's wrong with your script this way, please post it here with the $_POST variables.
     
    bogi, Jun 25, 2011 IP
  4. exodus

    exodus Well-Known Member

    Messages:
    1,900
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    165
    #4
    sometimes the spam filter picks up the emails. Sometimes the email they use for paypal is not the one they normally use to get emails. You could store the returned information in a mysql database to see if the ipn script is ran. also as above you could email yourself the post var's to see if everything is going ok.
     
    exodus, Jun 26, 2011 IP