I am in the process of setting max character limits for fields that we will let our customers modify to meet their needs. When I send this over as a merchant name using the Java SDK for Accept Hosted:
"Dunder Mifflin How much text can we fit in here before it cannot fit anymore"
I get the following error:
Response Code: [E00013] Response Text: [Invalid Setting Value. hostedPaymentOrderOptions: maximum length is 100.]
Now correct me if I'm wrong but that is LESS than 100. It's 76 characters. I'm not even close to the maximum.
The same issue happens with the 'Pay' button text:
"Pay Now With a 50 Character Limit On The Label"
Response Code: [E00013] Response Text: [Invalid Setting Value. hostedPaymentButtonOptions: maximum length is 50.]
That is 46 characters. Definetely closer to the maximum but not over it yet.
So what is going on here? Is the API lying to me? Is something out of date? I need some concrete values so I can continue to build my solution.
Thanks.
Edit:
And maybe this will help. For the code I'm using your API to do everything:
SettingType buttonSettings = new SettingType(); buttonSettings.setSettingName("hostedPaymentButtonOptions"); JSONObject buttonSettingsJSON = new JSONObject(); buttonSettingsJSON.put("text", getPayButtonText() ); buttonSettings.setSettingValue( buttonSettingsJSON.toString() ); ArrayOfSetting settingsList = new ArrayOfSetting(); settingsList.getSetting().add(buttonSettings); GetHostedPaymentPageRequest requestToAuthNet = new GetHostedPaymentPageRequest(); requestToAuthNet.setHostedPaymentSettings(settingsList);
Solved! Go to Solution.
12-31-2018 01:55 PM - edited 12-31-2018 02:03 PM
Alright, since no one at this company cares about potential customers and their problems at all, I did trial-and-error research myself. I'm posting my results in hopes that it will help people in the future who have questions about their API. Though I would highly suggest against this unintuitive headache and just use PayPal instead.
Renaissance was right in that it looks like it's including the entire JSON in the max length validation. Why? No idea. That is a really poor way of handling custom text by including other hardcoded text that is out of their control. So when you send your custom text like this, it's including these entire lines for the length validations:
"show":true,"merchantName":"Greater International Airport School for the Deaf and Blind" "text":"Pay Now With Venmo, PayPal, Or My Tears"
To confirm this I set up a name that was just barely on the text limit but still passed. If I had added another character to the name it would have failed. Then I took that good name and changed the 'true' to a 'false', thus adding one more character to the entire JSON but not touching the merchantName string. That failed. So the entire JSON is affecting it.
Which means that I will want to impose a maximum length of about 60 for the merchantName and 30 for the payButtonText if I want to avoid the API returning an error any of my customers.
Oh and apparnetly there is zero limit on the hostedPaymentReturnOptions. My text was blown way off the page without failing to get a nonce. Just more wild inconsistencies with the API.
Hopefully this helps any future people who run into this problem.
Problem resolved.
Good job, lightwave365 (and Renaissance) .
Edit: Seriously man, you delete my post because I talk bad about your customer service? Who is running this place? Do you care about people getting help at all?
01-09-2019 01:35 PM - edited 01-09-2019 01:49 PM
Don't use hosted but maybe it is saying the whole JSON line. Not just that text string.
01-02-2019 01:11 PM
01-02-2019 08:57 PM - edited 01-02-2019 08:58 PM
Don't you see a problem with that though? If the API is giving us incorrect error messages that sounds like a bug to me.
Byte length seems a bit odd. Why measure length in that? That's like measuring in number of vowels per sentence. It makes no sense.
01-03-2019 06:24 AM
01-03-2019 09:23 PM
01-03-2019 09:24 PM
01-03-2019 10:10 PM
It would be lovely if someone who actually supports this software responded instead of just us users speculating what might be true about something we know nothing about.
I do appreciate you Renaissance for trying to help me with my issues though. Customer service is just terrible here and I absolutely dread whenever I need to update our software with Authorize.Net. Even if it is only once every five years. It's five years too many.
01-04-2019 12:53 PM - edited 01-04-2019 01:02 PM
Alright, since no one at this company cares about potential customers and their problems at all, I did trial-and-error research myself. I'm posting my results in hopes that it will help people in the future who have questions about their API. Though I would highly suggest against this unintuitive headache and just use PayPal instead.
Renaissance was right in that it looks like it's including the entire JSON in the max length validation. Why? No idea. That is a really poor way of handling custom text by including other hardcoded text that is out of their control. So when you send your custom text like this, it's including these entire lines for the length validations:
"show":true,"merchantName":"Greater International Airport School for the Deaf and Blind" "text":"Pay Now With Venmo, PayPal, Or My Tears"
To confirm this I set up a name that was just barely on the text limit but still passed. If I had added another character to the name it would have failed. Then I took that good name and changed the 'true' to a 'false', thus adding one more character to the entire JSON but not touching the merchantName string. That failed. So the entire JSON is affecting it.
Which means that I will want to impose a maximum length of about 60 for the merchantName and 30 for the payButtonText if I want to avoid the API returning an error any of my customers.
Oh and apparnetly there is zero limit on the hostedPaymentReturnOptions. My text was blown way off the page without failing to get a nonce. Just more wild inconsistencies with the API.
Hopefully this helps any future people who run into this problem.
Problem resolved.
Good job, lightwave365 (and Renaissance) .
Edit: Seriously man, you delete my post because I talk bad about your customer service? Who is running this place? Do you care about people getting help at all?
01-09-2019 01:35 PM - edited 01-09-2019 01:49 PM
Thanks for your post. This is a bug where the max length check is being done on
whole JSON inside the settingValue.
We have added a bug for the dev team to look into it .
Thanks
Anurag
01-13-2019 08:11 PM