Paypal ipn issue

Discussion in 'Technical Support' started by ozgunsales, Dec 7, 2015.

  1. ozgunsales New Member

    Having an issue with paypal and 68 classifieds activating adverts after payment is made (not completed status) and I'm getting the error - waiting for approval message on the thank you page. It happened all of a sudden at the start of the month without and changes I've made to files. It was working fine before that. Normal adverts are being listed fine without paypal. Im running the latest 68 Classifieds. I have run debug mode and this is what i got
    Status: Completed
    Txn ID: 4K66794950494443W
    Response: </body></html>

    Ord ID: 38393
    Pending Reason:
    Array
    (
    [mc_gross] => 25.00
    [protection_eligibility] => Ineligible
    [payer_id] => AWWMBFU8KH954
    [tax] => 0.00
    [payment_date] => 20:23:46 Dec 07, 2015 PST
    [payment_status] => Completed
    [charset] => windows-1252
    [first_name] => David
    [mc_fee] => 0.95
    [notify_version] => 3.8
    [custom] => 38393
    [payer_status] => verified
    [business] => [email protected]
    [quantity] => 1
    [verify_sign] => AB63pz3qIrLOaZiQqVB04NGoucJcABQEkCuthbOKHucnaQ1lY5hnmWI4
    [payer_email] => [email protected]
    [txn_id] => 4K66794950494443W
    [payment_type] => instant
    [payer_business_name] => 13 CHILLIES
    [last_name] => Jobson
    [receiver_email] => (REMOVED)@bigpond.net.au
    [payment_fee] =>
    [receiver_id] => K97JXKTRCHYJY
    [txn_type] => web_accept
    [item_name] => PLATINUM
    [mc_currency] => AUD
    [item_number] =>
    [residence_country] => AU
    [handling_amount] => 0.00
    [transaction_subject] => 38393
    [payment_gross] =>
    [shipping] => 0.00
    [ipn_track_id] => 5cc0c8e2a2b61
    )
  2. ozgunsales New Member

    Using the IPN Simulator at paypal developer i got this
    Status: Completed
    Txn ID: 899327589
    Response: </body></html>

    Ord ID: xyz123
    Pending Reason:
    Array
    (
    [payment_type] => instant
    [payment_date] => Tue Dec 08 2015 21:45:17 GMT+1100 (AEDT)
    [payment_status] => Completed
    [payer_status] => verified
    [first_name] => John
    [last_name] => Smith
    [payer_email] => [email protected]
    [payer_id] => TESTBUYERID01
    [address_name] => John Smith
    [address_country] => United States
    [address_country_code] => US
    [address_zip] => 95131
    [address_state] => CA
    [address_city] => San Jose
    [address_street] => 123 any street
    [business] => [email protected]
    [receiver_email] => [email protected]
    [receiver_id] => [email protected]
    [residence_country] => US
    [item_name1] => something
    [item_number1] => AK-1234
    [quantity] => 1
    [shipping] => 3.04
    [tax] => 2.02
    [mc_currency] => USD
    [mc_fee] => 0.44
    [mc_gross] => 12.34
    [mc_gross1] => 12.34
    [mc_handling] => 2.06
    [mc_handling1] => 1.67
    [mc_shipping] => 3.02
    [mc_shipping1] => 1.02
    [txn_type] => cart
    [txn_id] => 899327589
    [notify_version] => 2.4
    [custom] => xyz123
    [invoice] => abc1234
    [test_ipn] => 1
    [verify_sign] => A9N-K9rM-aS1bo3aVogFV-f5dSE6A1y9KjJKGZ8Gu24TNQzgMG.qe2xN
    )
  3. ozgunsales New Member

  4. ozgunsales New Member

    Ive tried different templates and that doesn't make any difference. Ive checked the database..its big ( been going since 2008). Its still recording transactions that aren't from paypal. Any ideas? Its a lot of work having to rely on the debugging emails to activate orders manually.
  5. Mike-N-Tosh Owner

    This is an odd one. Haven't seen any other reports of PayPal payments failing. I'm assuming that when you said, "I have run debug mode and this is what i got", you are changing the $debugmode in the "paypal.php" file from "FALSE" to "TRUE"???

    This hasn't been tested, however you might try this:

    In the paypal.php file around line #77 find this:
    PHP:
    if (strcmp($res"VERIFIED") == 0)
    change it to this instead:
    Code:
    if (strcasecmp($res, "VERIFIED") == 0)
  6. ozgunsales New Member

    still an error
    this is the debug email
    Status: Completed
    Txn ID: 16A32600XC193201L
    Response: </body></html>

    Ord ID: 38417
    Pending Reason:
    Array
    (
    [mc_gross] => 25.00
    [protection_eligibility] => Ineligible
    [payer_id] => AWWMBFU8KH954
    [tax] => 0.00
    [payment_date] => 17:55:39 Dec 08, 2015 PST
    [payment_status] => Completed
    [charset] => windows-1252
    [first_name] => David
    [mc_fee] => 0.95
    [notify_version] => 3.8
    [custom] => 38417
    [payer_status] => verified
    [business] => [email protected]
    [quantity] => 1
    [verify_sign] => AGwhTOZ-UAC5wD6DamgHfq.3jyVmAFfJUOZF37iNewcYUvC4IDrsnBnn
    [payer_email] => [email protected]
    [txn_id] => 16A32600XC193201L
    [payment_type] => instant
    [payer_business_name] => 13 CHILLIES
    [last_name] => Jobson
    [receiver_email] => ######@bigpond.net.au
    [payment_fee] =>
    [receiver_id] => K97JXKTRCHYJY
    [txn_type] => web_accept
    [item_name] => PLATINUM
    [mc_currency] => AUD
    [item_number] =>
    [residence_country] => AU
    [handling_amount] => 0.00
    [transaction_subject] => 38417
    [payment_gross] =>
    [shipping] => 0.00
    [ipn_track_id] => 5ed8f808f0779
    )
  7. ozgunsales New Member

    It seems the paypal ipn is sending information to the site ok but its not being recorded for some reason.
    I am also in the process of getting help from the paypal integration team, just in case its their end thats causing the issue. Definitely a head scratcher.
  8. Mike-N-Tosh Owner

    Definitely a perplexing issue. Although you said that you haven't changed anything, something has to have changed as things don't just suddenly work or not work differently without a change of some kind.

    Have you turned on php error reporting (init.php) to see if there are any php errors being reported? Have you checked with your web hosting provider support to see if they made any changes in the server environment?
  9. ozgunsales New Member

    Will turn on the php error reporting now.
    Yep, Contacted my hosting provider first, they said they had not changed anything.
  10. ozgunsales New Member

    Ok i been in touch with paypal this was there response after testing.
    Hello Dave,
    Can you please make sure that this url "http://www.website.com/thanks.php?gateway=paypal" have been setup to process the IPN as our IPN server cannot send to that URL and PayPal doesn't received any response from that url.
    Sincerely,
    Fadzli H.
    Merchant Technical Support
    PayPal
  11. ozgunsales New Member

    radhe i haven't changed any code for a few months and nothing to do with paypal processing. And switching templates to default still had the same results so its not a template change causing the issue.
  12. Mike-N-Tosh Owner

    Paypal wouldn't be able to send to that url. That is the "return_url", where the customer is sent to AFTER processing the payment @PayPal. The customer has a current session and is logged in. Paypal is not. The "notify_url" (for IPN processing) which is sent with the initial form when the customer is sent to Paypal is http://yoursite/paypal.php. I believe that is also where your issue is and what has changed on your web server. Something is either wrong with that file or the permissions for that file are wrong. It causes a server error! This is also why I asked earlier if you turned on php error reporting much earlier in the thread.

    I would recommend taking a look at the permissions for the file and correcting them if it is wrong. If not, replace the file with a copy of the original.
  13. ozgunsales New Member

    No sorry I think I confused you, I have it set to www.website.com/paypal.php in Paypal, i just got them to also test the other url as I saw it in some of your material saying the use of it ( file - includes/paymentapi/paypal/readme.php). I have already tried uploading older versions of the files to make sure no changes had been made and also checked the permissions they are set to 644. I get no php error messages. I have also tried using another paypal account to see if that made a difference.
  14. Mike-N-Tosh Owner

    Again, I get a server error from all browsers:
    HTTP/1.1 400 Bad Request Date: Wed, 16 Dec 2015 02:52:49 GMT Server: Apache Content-Length: 226 Connection: close Content-Type: text/html; charset=iso-8859-1
    Bad Request

    Your browser sent a request that this server could not understand.
  15. ozgunsales New Member

    Ah ok, now i see how that works. Yet the handshake on paypal says that its fine. Looks like maybe its something the server is doing then? As I just changed the files again to with another backup copy of them I had to make sure it wasn't them.
  16. ozgunsales New Member

    Ive passed this onto my hosting server as they run the data centre in case its something they have done also related to the bad request.
  17. ozgunsales New Member

    checkpoint04HTTP/1.1 400 Bad Request Date: Wed, 16 Dec 2015 05:26:25 GMT Server: Apache Content-Length: 226 Connection: close Content-Type: text/html; charset=iso-8859-1
    Bad Request

    Your browser sent a request that this server could not understand.
  18. ozgunsales New Member

    Ok seems I'm going around in circles. Hosting Tech support believes it is paypal causing the issue.
    Hi Dave,

    That error is a result of the fgets function referrecing the $fp resource. This $fp resources is a socket that opened to the www.paypal.com site so I’m pretty sure this error is coming from the paypal server.

    Regards,
    Technical Support Analyst
  19. Mike-N-Tosh Owner

    Although I haven't actually seen that error myself. I would suspect that would be due to the fact that you don't use an SSL certificate at your site, therefore both the "return_url" and the "notify_url" are sent to a standard "http" url (not secure) versus an "https" url (secured by an ssl certificate).
  20. ozgunsales New Member

    Ok I've managed to get it at least recognising a payment is done on the site. Just getting completed pending approval message now. Will reset all files back to originals and see if that helps.

    In the end I disabled the IPN on paypal all together as Ive just found out its not needed to fill out and set anymore for it to work. Go figure

Share This Page