Hello,
I need to store larger API keys, and I found a strange issue: in the XML configuration of the plugin, I cannot store a password longer than 99 characters.
I have this example to explain better my concern:
<field name="test_secret_key" type="password" size="35" default="" label="VMPAYMENT_STRIPE_TEST_SECRET_KEY"
description="VMPAYMENT_STRIPE_TEST_SECRET_KEY_DESC"/>
<field name="test_publishable_key" type="text" size="35" default=""
label="VMPAYMENT_STRIPE_TEST_PUBLISHABLE_KEY"
description="VMPAYMENT_STRIPE_TEST_PUBLISHABLE_KEY_DESC"/>
From the back end, when I save the test_secret_key, it is truncated after 99 chars. It is ONLY happening for the fields in XML type="password". With type="text" it can be larger, no problem.
I even tried to edit directly the Database: the longer key can be stored that way, and use in the front end plugin. But as soon as I edit in the back end, the test_secret_key gets truncated again.
I have tested with the Paypal plugin, and the type password behaves the same way.
http://dev.virtuemart.net/projects/virtuemart/repository/revisions/10338/entry/trunk/virtuemart/plugins/vmpayment/paypal/paypal.xml#L45 (http://dev.virtuemart.net/projects/virtuemart/repository/revisions/10338/entry/trunk/virtuemart/plugins/vmpayment/paypal/paypal.xml#L45)
Would you have any idea to solve that issue and update the code?
Thanks!
You should be able to override the "99"
https://docs.joomla.org/Text_form_field_type
"maxlength (optional) limits the number of characters that may be entered."
<field name="test_secret_key" type="password" size="35" maxlength="200" default="" label="VMPAYMENT_STRIPE_TEST_SECRET_KEY"
description="VMPAYMENT_STRIPE_TEST_SECRET_KEY_DESC"/>
<field name="test_publishable_key" type="text" size="35" maxlength="200" default=""
label="VMPAYMENT_STRIPE_TEST_PUBLISHABLE_KEY"
description="VMPAYMENT_STRIPE_TEST_PUBLISHABLE_KEY_DESC"/>
Oh woah! Thanks a Millions AH!
It works perfectly!
After a fix release, I am going to update other similar fields, especially the API keys, password, passphrases, etc... and add it to the next minor release.
AH, I owe you one (or more). If you need the plugin at a discount, please just ping me!
Have a lovely day everyone!
Great to know it works for your problem and thanks for posting an update :-)
QuoteAH, I owe you one (or more).
I owe so many more people - it is nice to be able to help others :-)
Now, the release is public!
https://www.puma-it.ie/en/joomla-virtuemart-extensions/downloads/download-stripe-for-virtuemart/file/stripe-payment-plugin-2-3-2
And I usually do, I credited in the changelog the help received. Thank you AH!
"# Add support for New longer Stripe API keys (Thank you AH!)"
Nice touch :-)
@rvbgnu this reminded me to update the Stripe plugin on a client site. Thanks.
Great stuff Kelvyn! Thanks to you for using our Stripe plugin ;-)