• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[ZnoteAAC] PayPal IPN fix. (Not 100% tested)

Cornex

Web Developer
Staff member
Global Moderator
Joined
Jun 15, 2008
Messages
3,444
Solutions
5
Reaction score
1,166
Location
Sweden
Hello, I got a few reports that Znote's IPN no longer work. So I decided to dig into this.
What I came up with, is, in engine/database/connect.php, there is a few lines containing functions that no longer seems to exists... :confused:

So, to fix this, start with removing (comment) following lines from connect.php file:

https://github.com/Znote/ZnoteAAC/blob/master/engine/database/connect.php#L274
https://github.com/Znote/ZnoteAAC/blob/master/engine/database/connect.php#L286
https://github.com/Znote/ZnoteAAC/blob/master/engine/database/connect.php#L310

Now, lets replace the ipn.php with the one I replaced it with, also it contains a cacert.pem, used for certification.. Read more here if you like.. :)

Once done with that, go a head and replace ipn.php and add cacert.pem to the website.

Download the files here: https://www.dropbox.com/s/p9l469goqxz2q9z/ipn.php.rar?dl=0

Hope this works, I'll update it if we find more errors! :)
 
I will test it later. Thx

PD: cacert.pem need some modification? or only put that on my website?
 
I put DEBUG to 1 and no generate ipn.log file when i bought points again. :(
 
I put DEBUG to 1 and no generate ipn.log file when i bought points again. :(

Yeah because I am a noob lol... Uploaded wrong IPN, try download again, now it should give you some messsage.
 
Yeah because I am a noob lol... Uploaded wrong IPN, try download again, now it should give you some messsage.

Same problem, 0 points and no generate ipn.log file :(
 
Same problem, 0 points and no generate ipn.log file :(

Sounds very wierd, tried it multiple times and works just fine for me. Do you running like linux or something?
If so make sure to give the files permissions to write and read.
 
Yeah linux. ubuntu 14.04
all have root permissions. Look:

3IqPxsb.png

Paypal receive the money, but points never reach. :(
PD: Gesior Paypal script not work (to me) when i used gesior aac. Maybe some wrong or weird in my paypal account?
 
Yeah linux. ubuntu 14.04
all have root permissions. Look:

3IqPxsb.png

Paypal receive the money, but points never reach. :(
PD: Gesior Paypal script not work (to me) when i used gesior aac. Maybe some wrong or weird in my paypal account?

Could be, I added you on skype so we can investigate it.

Cannot edit my last post, so just merge it if you like to mods.

The main problem for @Pretx was that he using @Don Daniello 's hosting service, it seems like they already set a path for cacert.pem.
So what you should do is place the cacert.pem inside /etc/ssl/certs and comment out following lines in the ipn.php:

PHP:
$cert = __DIR__ . "./cacert.pem";
curl_setopt($ch, CURLOPT_CAINFO, $cert);
 
Last edited by a moderator:
Why exactly do you bundle cacert.pem with your scripts at all? PayPal's certificates are naturally valid with all sane OS distros.
 
Back
Top