Paid Subscription - Subscriptions-PayPal fails to activate new sub

Started by HoverClub, October 04, 2013, 03:17:17 PM

Previous topic - Next topic


    Version(s) of SMF
2.0.5 (but shouldn't matter)
    Your Setup:
        Curve theme
    Where the Error Occurred
        File:  Subscriptions-PayPal.php
        Line: 216
// Verify the currency!
if (strtolower($_POST['mc_currency']) != $modSettings['paid_currency_code'])

If paid_currency is set to 'other' in the paid subscription settings AND paid_currency_code uses any uppercase letters then the test above always fails.  Either strtolower should be used on both variables (good practice) OR ManagePaid.php should lcase paid_currency_code before saving it.  Note that the pre-set codes (USD, GBP, EURO.) are have lowercase ID's as default.


Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more! -  Paid Modifications for SMF

EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro



Thank you for the report and thanks for reporting to Github :)


You're welcome (another few hours of my life gone  :P).

There is something that bugged me when looking at this code and that is the fairly extensive use of exit within functions.  IMHO it would be a LOT easier to find strange problems like this one if all errors were logged (even if they should never happen  ;)).