News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Paid subscription (Script or Paypal forgets the + ) temp fix included

Started by telcy, August 06, 2013, 03:44:33 AM

Previous topic - Next topic

telcy

Hi,

We have a simple machines board with many daily subscriptions.
Sometimes the script or paypal forgets the "+" in the item_number.

So the script can't recover the member id.

The right one: 3+32472
If the script gets a wrong one: 3 32472

I can't say exactly where this problem starts, but I've added a temp fix which replaces the white space with a + letter.

Subscriptions-Paypal.php

AFTER:
// Check that this is intended for us.
if ($modSettings['paypal_email'] != $_POST['business'] && (empty($modSettings['paypal_additional_emails']) || !in_array($_POST['business'], explode(',', $modSettings['paypal_additional_emails']))))
exit;


INSERT:
// Temp fix: Replace white space with plus
$_POST['item_number'] = str_replace(" ", "+", $_POST['item_number']);




Regards,
telcy

Arantor

Included in 2.1, thanks, though done under a slightly different format and in a way that would not affect the intended behaviour of everything (and wouldn't throw errors if not sent)

Advertisement: