BitPay Error:One or more fields is invalid

  • Posts: 95
  • Thank you received: 1
10 years 2 months ago #172510

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.3
-- Error-message(debug-mod must be tuned on) -- : Error
Sorry your transaction did not go through successfully, please try again.
Error:One or more fields is invalid

Hi,

The BitPay payment plugin does not work. It is set and enabled but after every purchase this message appears (instead of completing the payment):

Error
Sorry your transaction did not go through successfully, please try again.
Error:One or more fields is invalid

I tried to change all values in my address, disabled the phone number, not using any special characters. In the plugin setup I have:
Custommer address set to "No address"
Address override set to "No".

Any idea how to fix the problem?

Thanks
Vaclav

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 2 months ago #172516

Hi,

Please check the content of the log of the plugin (bplog.txt) which should be in the plugin folder.
If you can also provide a screenshot of your configuration (without your credentials), it would help us.
The plugin has not been developed by the HikaShop team, so our knowledge on the plugin is not perfect.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 95
  • Thank you received: 1
10 years 2 months ago #172652

Hi Nicolas,

thanks for your reply.

I checked that log and find out the error: 'buyerState' => 'must be 100 characters or less', Which I solved by publishing States in shipping address.

After I did this the error disappeared.

But there is one more error which still persist. The error is:

09-23 10:20:41: array (
  'error' => 
  array (
    'type' => 'validationError',
    'message' => 'One or more fields is invalid',
    'messages' => 
    array (
     'itemDesc' => 'must be 100 characters or less',
    )
I tried to add description to "product_description" of the product I tried the order with but it didnt help.

You can see the screenshot attached.

Thanks
Vaclav

Attachments:
Last edit: 10 years 2 months ago by Jerome.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 2 months ago #172703

Hi,

Regarding the plugin, there is some code in order to strip the variables so I think the error message is there because the variable is empty.
Please edit the plugin and replace

			if(isset($options[$k])){
				$options[$k] = substr($options[$k], 0, 100);
			}
By
			if(isset($options[$k])){
				$options[$k] = substr($options[$k], 0, 100);
				if(empty($options[$k]))
					unset($options[$k]);
			}
It will unset the options while empty.
I hope it will fix the issue.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 95
  • Thank you received: 1
10 years 2 months ago #172779

Hi Jerome,

thanks for your reply.

I did what you wrote but this error persist:

'error' =>
array (
'type' => 'validationError',
'message' => 'One or more fields is invalid',
'messages' =>
array (
'itemDesc' => 'must be 100 characters or less',
),

Any other idea?

Thanks
Vaclav

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 2 months ago #172785

Hi,

Without knowing the incriminated field or more details about your configuration, I am sorry but no.
We did not developed the plugin, we are not able to reproduce your problem.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 68
  • Thank you received: 6
9 years 11 months ago #182908

In the file plugins/hikashoppayment/hikabitcoin/hikabitcoin.php

Replace the line

$options['itemDesc'] = $item->order_product_name;
With
$options['itemDesc'] = substr($item->order_product_name, 0, 95). " ...";

That works for me.

Last edit: 9 years 11 months ago by Jerome. Reason: [code] is nice
The following user(s) said Thank You: Jerome, vaclav

Please Log in or Create an account to join the conversation.

  • Posts: 95
  • Thank you received: 1
9 years 11 months ago #183279

Thanks cbadmin - your solution worked.

Please Log in or Create an account to join the conversation.

Time to create page: 0.077 seconds
Powered by Kunena Forum