News:

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

Main Menu

2.1 Paid Subs

Started by Krashsite, March 26, 2015, 03:45:18 PM

Previous topic - Next topic

Sir Osis of Liver

ManagePaid.php -



'items_per_page' => $modSettings['defaultMaxListItems'],   



$modSettings is not globalized in function ViewSubscribedUsers().  Have to add it here -



function ViewSubscribedUsers()
{
global $context, $txt, $scripturl, $smcFunc, $sourcedir, $modSettings;


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

Sir Osis of Liver

2.1 Subscriptions-PayPal.php does not work.  Too many changes to track it down right now.  Recommend 2.1 users be advised to replace it with 2.0 Subscriptions-PayPal.php, which works fine in 2.1.  Goes without saying (but will say it anyway) this code should have been checked for basic functionality before public release. :P
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Illori

2.1 is not a public usable release. it is still a beta release, this would be a good reason why it is still in beta.

Sir Osis of Liver

Am aware of that, but Beta 1 is public and people are using it.  Bugs are expected, but basic stuff should work.  This feature has been problematic since it was first introduced in 2.0, now it doesn't work at all in 2.1. 
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Biology Forums

Krash, if this is an important thing on your forum, you should consider purchasing SMF Store. It hasn't given me a problem since day 1.

Illori

Quote from: Krash on March 26, 2015, 04:59:16 PM
Am aware of that, but Beta 1 is public and people are using it.  Bugs are expected, but basic stuff should work.  This feature has been problematic since it was first introduced in 2.0, now it doesn't work at all in 2.1. 


that is why we dont recommend ANYONE to use 2.1 in a production environment. the devs do want bugs reported. paid subs has not had enough people with knowledge to test and fix the issues. you know Arantor asked you to test it and you did not when asked. if you had then this may have been fixed before 2.1 even hit a beta release.

Sir Osis of Liver

<sigh>

Krash Arantor, but you don't need anyone to test it to see that it doesn't work at all.

The problem is in this function-



public function isValid()
{
global $modSettings;

// Has the user set up an email address?
if ((empty($modSettings['paidsubs_test']) && empty($modSettings['paypal_email'])) || empty($modSettings['paypal_sandbox_email']))
return false;
// Check the correct transaction types are even here.
if ((!isset($_POST['txn_type']) && !isset($_POST['payment_status'])) || (!isset($_POST['business']) && !isset($_POST['receiver_email'])))
return false;
// Correct email address?
if (!isset($_POST['business']))
$_POST['business'] = $_POST['receiver_email'];

// Are we testing?
if (!empty($modSettings['paidsubs_test']) && $modSettings['paypal_sandbox_email'] !== $_POST['business'] && (empty($modSettings['paypal_additional_emails']) || !in_array($_POST['business'], explode(',', $modSettings['paypal_additional_emails']))))
return false;
elseif ($modSettings['paypal_email'] !== $_POST['business'] && (empty($modSettings['paypal_additional_emails']) || !in_array($_POST['business'], explode(',', $modSettings['paypal_additional_emails']))))
return false;
return true;
}



Validation fails without error.  Something to do with the added sandbox code.  Can't see well enough to chase it now, and booleans make me .  If someone else doesn't find it, will have another go tomorrow.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

Quote from: Shuban on March 26, 2015, 05:19:23 PM
Krash, if this is an important thing on your forum, you should consider purchasing SMF Store. It hasn't given me a problem since day 1.

Thanks, but have never used Paid Subs on my forums, this is strictly a development and support issue.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

live627

Quote from: Krash on March 26, 2015, 03:45:18 PM
ManagePaid.php -



'items_per_page' => $modSettings['defaultMaxListItems'],   



$modSettings is not globalized in function ViewSubscribedUsers().  Have to add it here -



function ViewSubscribedUsers()
{
global $context, $txt, $scripturl, $smcFunc, $sourcedir, $modSettings;



https://github.com/SimpleMachines/SMF2.1/commit/94fe7b488103ef998a2ca646eb4b2f0ded3d818a --  fixed 5 months ago :o

Kindred

What date/version of the beta did you test on krash?
Сл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."

Deaks

~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Kindred

#12
Yes... i am on that thread as well... but, if it was noted as fixed, we need confirmation that the check/test was done with the most recent github version... not the beta1 available on thus dire
Сл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."

margarett

Quote from: Kindred on March 27, 2015, 09:26:45 AM
Yes... i am on ggat thread as well... but, if it was noted as fixed, we nwed confirmation tgst the check/test was done with the most recent github version... not the beta1 available on thus dire
Let go that phone, man ;D
(SMF has a very nice feature, it's called "Return to topics after posting by default" :P )

These are different things, though. This is a particular issue but, in order to have paid subs working (even after fixing this), it is required to replace "Subscriptions-PayPal.php" with the copy of 2.0.9 (which suggests that other things are broken)
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

Quote from: Kindred on March 27, 2015, 12:32:29 AM
What date/version of the beta did you test on krash?

Looks like it's a beta 1 install from November.  OP in that support thread must be running same version.

Quote from: margarett on March 27, 2015, 10:04:05 AM
These are different things, though. This is a particular issue but, in order to have paid subs working (even after fixing this), it is required to replace "Subscriptions-PayPal.php" with the copy of 2.0.9 (which suggests that other things are broken)

public function isValid() is borked, some code was added for sandbox testing and it kills IPN validation.  If you replace the function with the simpler 2.0 version, it works.  Will tinker with it tonight.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Antes

You should run latest version from GitHub to reproduce user reported issues.

Kindred

Quote from: Antes on March 27, 2015, 04:13:14 PM
You should run latest version from GitHub to reproduce user reported issues.

exactly my point. :P


(as for my phone, bruno...   it's the only way I can access the site during the day... can't do it from the company computers -- and I utterly despise that "return to post" option. :P :P :P )
Сл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

Quote from: Antes on March 27, 2015, 04:13:14 PM
You should run latest version from GitHub to reproduce user reported issues.

Yes, I know, but haven't been doing anything with 2.1.  This was a support issue, and it helped to be able to reproduce OP's problem in the older version.

Is the 2.1 download here current with github?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

No. The one on this site is seriously outdated. Unfortunately, we do not have any good way to currently keep our download page synced with github.
Сл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

Ok, in Subscriptions-PayPal.php problem was here -



if ((empty($modSettings['paidsubs_test']) && empty($modSettings['paypal_email'])) || empty($modSettings['paypal_sandbox_email']))
return false;



It craps out if there's no sandbox email.  It's fixed in the current 2.1 download, reverted back to 2.0 code.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: