Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
149 Widoki

This error refers to the credit card expiration field during checkout. Can anyone tell me where this error is located? I'd like to make it a little more detailed as to what the customer needs to do.


Thank you

Awatar
Odrzuć

Can't find an occurrence of the string 'value must be less than' matching the described area. Furthermore, credit card payments aren't handled by Odoo but via 3rd party integrations (Payment Provider) - which one are you using? I would suspect this is a response message from such a provider. Screenshot and details about the provider in use would be helpful.

Autor

Thank you for the response.

We are using authorize (dot) net.

I'll try to get a screenshot, but I provided all the info

Ah, Sean, long time no see;
Marking provided answers as a solution also gives you karma points, just saying ;)
Let me see if there's something interesting around the authroize.net integration...

Autor

Oh yeah, I can't post a screenshot or post a link here

Is 'value must be less than 99' the exact message returned? Any thing in addition?

Najlepsza odpowiedź


You're issue is with the behavior of the browser you are using.

In Mozilla Firefox the message would be 'Please select a value that is no more than 99.'

In Chromium-based browsers it would be 'Value must be less than or equal to 99.'


These messages are constructed based on the HTML specs for input fields of type 'number', when the 'max' attribute is exceeded.


You would need to apply custom JS-based validation on the field with id o_authorize_year if you'd want to change that. The input field, ultimately making your web browser raising the error, is defined in https://github.com/odoo/odoo/blob/17.0/addons/payment_authorize/views/payment_authorize_templates.xml#L19

Awatar
Odrzuć
Autor Najlepsza odpowiedź

Excellent. Thank you for taking the time to look at this.

Nothing additional, what I wrote is what was passed to me. 

Given everything you discovered, I guess it would be easier to just add some text below that field explaining to only use 2 digits.


EDIT: My reply button is gone now so hopefully you'll see this. I like the drop down idea, I may just implement that. Thank you very much for your researching and helping out with this.

Awatar
Odrzuć

Mh, you could consider making it a selection field though - with YY's in the near future (I guess no credit card will be valid for more than 6 years anyways, thus a range of options from 25 to 35 should probably be sufficient already - and occasionally updated)

'My reply button is gone now' - Yeah, everyone can just add one answer to a post - this should encourage optimizing ones answers and prevent starting discussion chats making it look like there are a ton of answers to a questions when there isn't actually anything relevant.
'I like the drop down idea, I may just implement that.' - There might be still some JS validation that needs to be taken care about, but most heavy lifting must happen at the authorize.net servers already anyways.

Powiązane posty Odpowiedzi Widoki Czynność
4
sie 25
1074
2
cze 25
586
1
cze 25
1413
1
sie 25
1361
1
cze 25
863