StripeGateway module has deprecated parameter

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Utter
Forum Members
Forum Members
Posts: 41
Joined: Sun Mar 06, 2005 11:39 pm

StripeGateway module has deprecated parameter

Post by Utter »

Robert - if you see this you probably already know I submitted it as a bug to the module, not cos it's much of a bug but just to alert you that that parameter was deprecated.

While testing this module the test transactions always failed with a non-specific error message saying the transaction could not be completed. Checking in the Stripe account dashboard logs showed:
type: "invalid_request_error"
message: "Received unknown parameter: statement_description"
param: "statement_description"
Checking on the Stripe API updates I found
The statement_description parameter on charges, invoices, transfers, and plans is now deprecated in favor of the statement_descriptor parameter, which allows you to specify the full descriptor that appears on your customer’s statement for the transaction. Specifying statement_descriptor without upgrading to this API version will still prepend your account’s statement descriptor to the transaction’s statement descriptor.
I checked the StripeGateway.module.php file and found this at line 404

Code: Select all

'statement_description'=>substr(cge_utils::get_param($this->_data,'description'),0,15),
Which I changed to

Code: Select all

'statement_descriptor'=>substr(cge_utils::get_param($this->_data,'description'),0,15),
I still received the error message and the error was still logged on the Stripe dashboard so I downloaded the latest API files from https://github.com/stripe/stripe-php/releases and swapped them for the files in the lib/ directory.

Now when I test a purchase I get no error log in Stripe but the post-transaction landing page is blank.

Additionally I see these errors in the Apache logs.

Code: Select all

[Wed Jan 20 08:30:54.199049 2016] [:error] [pid 7733] [client 146.185.20.156:65174] PHP Fatal error:  Class 'Stripe' not found in /var/www/html/tpb/modules/StripeGateway/action.create_charge.php on line 57
[Wed Jan 20 08:30:54.199126 2016] [:error] [pid 7733] [client 146.185.20.156:65174] PHP Stack trace:
[Wed Jan 20 08:30:54.199149 2016] [:error] [pid 7733] [client 146.185.20.156:65174] PHP   1. {main}() /var/www/html/tpb/index.php:0
[Wed Jan 20 08:30:54.199161 2016] [:error] [pid 7733] [client 146.185.20.156:65174] PHP   2. Smarty_CMS->fetch() /var/www/html/tpb/index.php:243
[Wed Jan 20 08:30:54.199171 2016] [:error] [pid 7733] [client 146.185.20.156:65174] PHP   3. Smarty_Internal_TemplateBase->fetch() /var/www/html/tpb/lib/classes/class.Smarty_CMS.php:341
[Wed Jan 20 08:30:54.199180 2016] [:error] [pid 7733] [client 146.185.20.156:65174] PHP   4. content_569f88bd6fecc2_28243531() /var/www/html/tpb/lib/smarty/libs/sysplugins/smarty_internal_templatebase.php:182
[Wed Jan 20 08:30:54.199191 2016] [:error] [pid 7733] [client 146.185.20.156:65174] PHP   5. CMS_Content_Block::smarty_internal_fetch_contentblock() /var/www/html/tpb/tmp/templates_c/1ed9b7e2d86c34f9dab8c572f920035e590a161e.tpl_body.27.php:60
[Wed Jan 20 08:30:54.199201 2016] [:error] [pid 7733] [client 146.185.20.156:65174] PHP   6. CMSModule->DoActionBase() /var/www/html/tpb/lib/classes/class.CMS_Content_Block.php:284
[Wed Jan 20 08:30:54.199210 2016] [:error] [pid 7733] [client 146.185.20.156:65174] PHP   7. StripeGateway->DoAction() /var/www/html/tpb/lib/classes/class.CMSModule.php:1799
[Wed Jan 20 08:30:54.199218 2016] [:error] [pid 7733] [client 146.185.20.156:65174] PHP   8. CGExtensions->DoAction() /var/www/html/tpb/modules/StripeGateway/StripeGateway.module.php:294
[Wed Jan 20 08:30:54.199227 2016] [:error] [pid 7733] [client 146.185.20.156:65174] PHP   9. CMSModule->DoAction() /var/www/html/tpb/modules/CGExtensions/CGExtensions.module.php:694
[Wed Jan 20 08:30:54.199235 2016] [:error] [pid 7733] [client 146.185.20.156:65174] PHP  10. include() /var/www/html/tpb/lib/classes/class.CMSModule.php:1732
Installed CMS/modules are:


CMS Version 1.12

CMSMailer 5.2.2
FileManager 1.4.5
MenuManager 1.8.6
ModuleManager 1.5.8
News 2.15.1
Printing 1.1.2
Search 1.7.12
JM_Forum 1.0.0
CGExtensions 1.50
CGSimpleSmarty 1.9.1
Products 2.23
CGEcommerceBase 1.5.2
CGPaymentGatewayBase 1.3.1
Cart 1.10.1
FrontEndUsers 1.30.6
Orders 1.16.5
SelfRegistration 1.9.3
PerItemShipping 1.1.2
PaypalGateway 2.4
JQueryTools 1.3.7
CGMyOrders 1.2.1
CompanyDirectory 1.22.12
FormBuilder 0.8.1.2
Promotions 1.2
CGCalendar 1.15.7
JM_NBBCode 1.0.1
CustomContent 1.10
Uploads 1.20.1
JM_BBCEditor 1.0.0
DestinationBasedShipping 1.1.2
CGGoogleMaps 2.1.4
CMSPrinting 1.0.5
MicroTiny 1.2.9
CGUserDirectory 1.5
TemplateExternalizer 2.1.6
SiteMapMadeSimple 1.2.8
ThemeManager 1.1.8
CGSmartImage 1.20.5
StripeGateway 1.1.1
PriceBasedShipping 1.1.3
StripeGate 0.8
Post Reply

Return to “Modules/Add-Ons”