yggdrasil Posted September 5, 2018 Share Posted September 5, 2018 I noticed that after upgrading to PHP 7, I cannot process Stripe payments anymore. On the server log I get: Stripe Notice: Undefined property of Stripe\\Customer instance On the WHMCS gateway log I get: You passed an empty string for 'statement_descriptor'. We assume empty values are an attempt to unset a parameter; however 'statement_descriptor' cannot be unset. You should remove 'statement_descriptor' from your request or supply a non-empty value. And of course, the files are encoded so there is nothing I can check to see that is causing this. 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted September 5, 2018 Author Share Posted September 5, 2018 Switching back to PHP 5 works. So this must be some bug in the Stripe or the WHMCS code that is triggering something with PHP 7. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 6, 2018 Share Posted September 6, 2018 17 hours ago, yggdrasil said: I noticed that after upgrading to PHP 7, I cannot process Stripe payments anymore. https://docs.whmcs.com/Stripe#You_passed_an_empty_string_for_.27statement_descriptor.27 Quote This error is caused by an empty Statement Descriptor field in the payment gateway configuration. Please ensure a value is entered into the field in the gateway configuration - it cannot be left empty. and for a more slightly descriptive answer semi-related... https://www.rivmedia.co.uk/whmcs-7-stripe-card-processor-failed-payments/4237 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted September 6, 2018 Author Share Posted September 6, 2018 (edited) 7 hours ago, brian! said: https://docs.whmcs.com/Stripe#You_passed_an_empty_string_for_.27statement_descriptor.27 and for a more slightly descriptive answer semi-related... https://www.rivmedia.co.uk/whmcs-7-stripe-card-processor-failed-payments/4237 This was actually the first thing I looked on the admin settings and I have here {CompanyName} and nothing else. My company name is not 22 characters long. Unless WHMCS is taking this from somewhere else. Also, on PHP 5 it works fine. It works both with the cron, billing an invoice manually on the admin side or in the customer side. When I flip back to PHP 7 the same error comes up on all 3 cases, cron, admin or customer side. As usual. When I opened a ticket on WHMCS, they took 24 hours to tell me to check logs and saying it works fine on their side. They didn't even bothered to tell me what that logs means or read what I posted so I had to ask again and waiting for a reply...I guess that is not required anymore. So I really appreciate Brian for finding those links. That is what WHMCS support should had replied in the first place. At least now I'm aware its related to a field. Its clearly something WHMCS is passing to Stripe that it does not like in PHP 7 but works fine in 5. On the Stripe side, when this error happens. There is actually no data received on the Stripe end at all. I don't see for example a charge declined. I thing there is a bug with how WHMCS is sending data to Stripe with PHP 7 or its failing to correctly take the {CompanyName}. If this is true, then it will take them months to fix. Since WHMCS said it works just fine on their side. I will just type the company name manually and see if this works. I assume WHMCS is taking this from the General settings, so not sure why now its failing. The data was never blank but with PHP 7 it seems to think it is. Edited September 6, 2018 by yggdrasil 0 Quote Link to comment Share on other sites More sharing options...
notdonski Posted September 6, 2018 Share Posted September 6, 2018 Had this problem (and a whole lot of other problems) with Stripe too after updating to the official module. Are you using a custom template? I think what caused it for us was not having the footeroutput variable in the footer.tpl of the template that we were using. 0 Quote Link to comment Share on other sites More sharing options...
notdonski Posted September 6, 2018 Share Posted September 6, 2018 I also changed the descriptor to something else then changed it back to {CompanyName}, not sure which one actually fixed the issue. Looking back, I should have probably tested it after changing the descriptor. Now I feel dumb. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 7, 2018 Share Posted September 7, 2018 14 hours ago, yggdrasil said: I thing there is a bug with how WHMCS is sending data to Stripe with PHP 7 or its failing to correctly take the {CompanyName}. If this is true, then it will take them months to fix. Since WHMCS said it works just fine on their side. I will just type the company name manually and see if this works. I assume WHMCS is taking this from the General settings, so not sure why now its failing. The data was never blank but with PHP 7 it seems to think it is. one thing you might want to check is what PHP extensions you have enabled in PHP5 that aren't enabled in PHP7 - i'm wondering if this functionality requires something that you haven't yet enabled in PHP7 ?? 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted September 8, 2018 Author Share Posted September 8, 2018 I solved this. I re-saved the settings on the Admin side. After speaking with support it seems some tables where missing for the statement descriptor. I have no idea why it was working with PHP 5 but I was able to replicate this on a test installation. After hitting save on the admin side, the statement descriptor with my data {CompanyName} now appears in the database. So basically, there where missing fields in the WHMCS database for Stripe which are created after re-saving the settings. I suspect this is more related to an upgrade that was done to the module at some point than PHP but again, I have no idea why it was still working fine with PHP 5 but not 7. Maybe because PHP 7 requires a new mcrypt module which I had to install when I upgraded to PHP 7. I'm just speculating. To resume. If someone else has the issue. First check that field, and then re-save all the settings. If that does not work. Check your WHMCS database under the proper paymentgateway table to see if that field is there. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.