News:

Wondering if this will always be free?  See why free is better.

Main Menu

character URLs problems after paypal payment

Started by arabeskrap.gen.tr, July 15, 2015, 04:12:14 PM

Previous topic - Next topic

Sir Osis of Liver

Quote from: Antes on July 23, 2015, 02:40:37 AM

In button codes, you are using different encoding with charset variable, use charset=utf-8 instead.

In addition to this, issue you mentioned is not about IPN, its about the values sent to return URL after a payment. As return URL you are using http://www.thekrashsite.com/smf20/index.php?action=profile;u=111;area=subscriptions;sub_id=6;done. To device Query string parameters you are using semi-colon. Not every server supports semi-colon in dividing query parameter. Instead using semi-colon in the URL, using ampersand in the dividing  in the return URL will fix the issue.

As Return URL I've been using http://www.mixoloji.net/index.php?action=profile&u=13&area=subscriptions&sub_id=11&done this and did some tests with my Sandbox button and didn't see any issue so far. You can take a look at the attachment.

This makes about as much sense in English as it does in Turkish.  :P
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

arabeskrap.gen.tr

Quote from: Krash on July 23, 2015, 03:08:55 PM


This makes about as much sense in English as it does in Turkish.  :P
What is the problem solution

Sir Osis of Liver

I cannot find what is causing the problem, but it appears to be host related, possibly a security configuration that is interfering with Paid Subs.  Your forum is also being blocked from sending emails.  There is nothing wrong with your forum installation or PayPal account.  The only thing I can suggest is that you move to a different host.  I will continue tinkering with this if I can come up with some new ideas, but at this point I'm stumped.  :P
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

arabeskrap.gen.tr

Quote from: Krash on July 23, 2015, 05:03:56 PM
I cannot find what is causing the problem, but it appears to be host related, possibly a security configuration that is interfering with Paid Subs.  Your forum is also being blocked from sending emails.  There is nothing wrong with your forum installation or PayPal account.  The only thing I can suggest is that you move to a different host.  I will continue tinkering with this if I can come up with some new ideas, but at this point I'm stumped.  :P
You can continue to work..

This problem still continues here
the same problem on my home server to another site -> http://www.muhabbetkusuureticileri.org/index.php?action=forum (The same problem)(different host)

SMF files associated with this problem, no problem hosting and PayPal

:-[ :-[ :-[

Kindred

you say that SMF files are associated with the problem -- which might or might not be true...

because no one has been able to duplicate your issue on another host.
You say that you made a second site on a different host and encountered the same problem.

Who is the second host?

Because this is definitely looking to be a host configuration/security issue
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

Received following from PayPal this morning -

Currently there are a couple of differences between the sandbox IPNs and the normal IPNs. Sandbox uses HTTP:/1.1 while Live uses HTTP:/1.0. I don't believe this will be the issue, as this will affect your ability to receive them (I am showing that the IPNs were received successfully). The Sandbox and Live endpoints do have different validation URLs as well, so any Live IPN message that you attempt to validate against the sandbox will come back as invalid, which may be what is causing the problem with these purchases not being recorded within your system. Can you confirm that your listener is attempting to validate these IPNs against https://www.paypal.com/cgi-bin/webscr ? and that you are receiving a "VERIFIED" back?

We are receiving both sandbox and live IPNs, sandbox subscriptions are successful, live subs fail.  Will check for validation code tonight, but that wouldn't be the problem, as it would affect all forums.  If I knew what host security is blocking, might be able to hack around it, possibly by making a live IPN look like a sandbox IPN.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

Ok, found it.  If I comment out these two lines in Subscriptions-PayPal.php, live subscription works -



// If this isn't verified then give up...
// !! This contained a comment "send an email", but we don't appear to send any?
//if (strcmp(trim($this->return_data), 'VERIFIED') != 0)
// exit;



Not sure what it does, but it's part of public function precheck(), which appears to validate post data.    It comes after this -



// Put the data to the port.
fputs($fp, $header . $requestString);

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

// Clean up.
fclose($fp);
}

// If this isn't verified then give up...
// !! This contained a comment "send an email", but we don't appear to send any?
//if (strcmp(trim($this->return_data), 'VERIFIED') != 0)
// exit;



$requestString is assembled here -



// Build the request string - starting with the minimum requirement.
$requestString = 'cmd=_notify-validate';

// Now my dear, add all the posted bits.
foreach ($_POST as $k => $v)
$requestString .= '&' . $k . '=' . urlencode($v);



That may be the problem.  I would guess it's a security risk to remove the validation.  Have emailed this info to PayPal, don't expect a response until Monday.
 

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

#47
Wondering if this is being blocked by the same security thing that's blocking outgoing forum emails -



// Put the data to the port.
fputs($fp, $header . $requestString);




When a customer makes a payment to you or a payment is reversed or refunded, PayPal will post a notification to your server at the URL you specified. Included in this notification will be all of your customer's payment information (e.g. customer name, payment amount) as well as a piece of encrypted code. When your server receives a notification, it will then post the information, including the encrypted code, back to a secure PayPal URL. PayPal will authenticate the transaction and send confirmation of its validity back to your server.

If host security is blocking outgoing emails (it apparently is), it is probably blocking the postback to PayPal.  This causes IPN verification to fail, and subscription fails.  This is a host security issue, as Kindred posted earlier in this thread.  I can hack around it, but really not a good idea.  You will need to resolve this with your host, as none of your forum notifications will work, so it's a larger problem than just Paid Subs.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair


margarett

Actually now you should be dealing with this issue with your host, not Krash...

Quote from: Krash on July 24, 2015, 11:03:47 PM
You will need to resolve this with your host, as none of your forum notifications will work, so it's a larger problem than just Paid Subs.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Sir Osis of Liver

I can modify the code to ignore the verification failure, and subscriptions will work, but it's not recommended.

From PayPal -

It is important that you Verify IPNs, as POST data can be sent to your listener, by a non-paypal poster.

It appears that outgoing emails from your forum are being blocked by your host, probably by the same security configuration that's blocking PayPal verification, so you'll have to get this fixed or other forum functions will not work.  If your host will not fix it, you'll have to change hosts.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

arabeskrap.gen.tr

Quote from: Krash on July 27, 2015, 01:32:32 PM
I can modify the code to ignore the verification failure, and subscriptions will work, but it's not recommended.

From PayPal -

It is important that you Verify IPNs, as POST data can be sent to your listener, by a non-paypal poster.

It appears that outgoing emails from your forum are being blocked by your host, probably by the same security configuration that's blocking PayPal verification, so you'll have to get this fixed or other forum functions will not work.  If your host will not fix it, you'll have to change hosts.

Hi Krash,
Does the work continues?

Kindred

I don't think that you are reading what Krash has written.

NO - he is not going to hack the code to work for you, since doing so would break the security of the payment/validation system.

Your issue --   as we said from the very beginnning lies with your **HOST** and the fact that the idiots at your host have misconfigured something which prevents your system from sending (or receiving, apparently) mail...   and this issue has extended beyond the actual mail to also include the paypal confirmation.

So -- your ONLY solution choices are:
1- work with your host to figure out what misconfiguration they have made and either fix it or turn off whatever stupid security protocol they THINK they need...
2- get a better host.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: