Jump to content

Stripe Broken after Upgrade


yggdrasil

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

7 hours ago, brian! said:

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 by yggdrasil
Link to comment
Share on other sites

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 ??

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated