Advertisement:

Author Topic: Dump PayPal verification?  (Read 618 times)

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,620
Dump PayPal verification?
« on: January 17, 2019, 05:39:02 PM »
Chasing what appears to be a server related Paid Subs glitch, would like to view the PayPal verification postback.  Looks like it happens here -

Code: [Select]

// Get the data back...
while (!feof($fp))
{
$this->return_data = fgets($fp, 1024);
if (strcmp(trim($this->return_data), 'VERIFIED') == 0)
break;
}


Subscription fails here -

Code: [Select]

/// If this isn't verified then give up...
if (strcmp(trim($this->return_data), 'VERIFIED') != 0) {
log_error('Paid Subscriptions error - IPN verification failed');
exit;
}


If I comment it out, sub activates.  PP support says verification is posted to forum.  Would like to at least confirm receipt, and view post data if possible.


Just checked, curl 7.29.0 is enabled, but verification still fails if I comment out curl code.

« Last Edit: January 17, 2019, 06:14:56 PM by Sir Osis of Liver »

Offline live627

  • Developer
  • SMF Hero
  • *
  • Posts: 5,565
  • Gender: Male
    • live627 on Facebook
    • live627 on GitHub
    • live627 on LinkedIn
    • @live627 on Twitter
    • livemods
Re: Dump PayPal verification?
« Reply #1 on: January 19, 2019, 04:40:17 PM »
Maybe you could try

Code: [Select]
log_error(var_export($this->return_data,  true)); ???

I think that logs the data to the error log.
Try not to become a man of success, but rather try to become a man of value.
- Albert Einstein

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,620
Re: Dump PayPal verification?
« Reply #2 on: January 19, 2019, 10:45:43 PM »
I'll give it a try soon as I get a chance.  Thanks.


Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,620
Re: Dump PayPal verification?
« Reply #3 on: January 24, 2019, 05:39:40 PM »
Running this code -

Code: [Select]

/// If this isn't verified then give up...

if (strcmp(trim($this->return_data), 'VERIFIED') == 0)
log_error('Paid Subscription successful');
log_error(var_export($this->return_data, true));

if (strcmp(trim($this->return_data), 'VERIFIED') != 0) {
log_error('Paid Subscriptions error - IPN verification failed');
log_error(var_export($this->return_data, true));
exit;
}



On test forum where sub activates normally, logs two errors -

Code: [Select]

http://www.thekrashsite.com/smf20/subscriptions.php
'VERIFIED'
 
http://www.thekrashsite.com/smf20/subscriptions.php
Paid Subscription successful


On client forum where verification fails, logs three errors -

Code: [Select]

https://www.nukeworker.com/forum/subscriptions.php
false

https://www.nukeworker.com/forum/subscriptions.php
Paid Subscriptions error - IPN verification failed

https://www.nukeworker.com/forum/subscriptions.php
false


Verification postback is sent from same PayPal ip as IPN, and we are receiving IPN, but either not receiving VERIFIED or it is somehow damaged.  Still stumped. >:(

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,535
    • StoryBB/StoryBB on GitHub
Re: Dump PayPal verification?
« Reply #4 on: January 24, 2019, 06:11:31 PM »
Find out if the hosting company restricts outward net connections, e.g. what the value of allow_url_fopen is.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,620
Re: Dump PayPal verification?
« Reply #5 on: January 24, 2019, 06:13:58 PM »
If that were the case, wouldn't PayPal not be receiving postback from forum?  They've told me postback is received, and they are sending verification.

phpinfo reports allow_url_fopen is 'On' (Local & Master).
« Last Edit: January 24, 2019, 06:24:27 PM by Sir Osis of Liver »

Offline live627

  • Developer
  • SMF Hero
  • *
  • Posts: 5,565
  • Gender: Male
    • live627 on Facebook
    • live627 on GitHub
    • live627 on LinkedIn
    • @live627 on Twitter
    • livemods
Re: Dump PayPal verification?
« Reply #6 on: January 24, 2019, 07:38:26 PM »
There are two code paths there: curl and fsock. Did you determine which one it uses?  Have you tried commenting out the curl code block?
Try not to become a man of success, but rather try to become a man of value.
- Albert Einstein

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,620
Re: Dump PayPal verification?
« Reply #7 on: January 24, 2019, 10:41:57 PM »
Yes, commented out curl code to force http, same result.  Other odd thing is, with verification commented out, subs activate ok, but around 10-15% are reported as active and pending.  There are also random currency errors that don't correspond with anything else.