- Posts: 241
- Thank you received: 5
Discount codes not working with Authorize.net
- cberry1971
-
Topic Author
- Offline
Less
More
10 years 9 months ago #222556
by cberry1971
Discount codes not working with Authorize.net was created by cberry1971
-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.5
After upgrading to hikashop 2.6.0 my discount codes do not work using Authorize.net (it works with PayPal).
After adding the code, accepting terms and conditions and selecting Authorize.net the user faces a white screen with
You can use the url provided and login using demo1/demo1234 to test for yourself... use coupon code test1
see below from our developer:
____________________
After contacting authorize and doing many tests, I see (suppose) that the problem is in hikashop system, there is an error in the form created by hikashop system to be submitted to Authorize system, it is exactly in x_line_item that contains the data about the coupon, the item price is negative in live (new update) while it is positive in older versions.. I suppose. I believe that the price should be always positive, so Authorize system is throwing an error (270) Line item 2 is invalid .Please let them (hikashop) know about that so they can understand the problem and hopefully solve it easily.
-- Joomla version -- : 3.4.5
After upgrading to hikashop 2.6.0 my discount codes do not work using Authorize.net (it works with PayPal).
After adding the code, accepting terms and conditions and selecting Authorize.net the user faces a white screen with
The following errors have occurred.
(270) Line item 2 is invalid.
You can use the url provided and login using demo1/demo1234 to test for yourself... use coupon code test1
see below from our developer:
____________________
After contacting authorize and doing many tests, I see (suppose) that the problem is in hikashop system, there is an error in the form created by hikashop system to be submitted to Authorize system, it is exactly in x_line_item that contains the data about the coupon, the item price is negative in live (new update) while it is positive in older versions.. I suppose. I believe that the price should be always positive, so Authorize system is throwing an error (270) Line item 2 is invalid .Please let them (hikashop) know about that so they can understand the problem and hopefully solve it easily.
The following user(s) said Thank You: solia
Please Log in or Create an account to join the conversation.
10 years 9 months ago - 10 years 9 months ago #222674
by nicolas
Replied by nicolas on topic Discount codes not working with Authorize.net
Hi,
The problem comes from a fix we had to do for the Payeezy payment gateway.
The Payeezy payment gateway check that the amounts sent by the website match with the full total and requires that the coupon value is negative or the total doesn't match.
But it seems that this interfers Authorize.net which doesn't like negative values...
I guess we'll have to add yet another option...
In the mean time, just change the line:
to:
in the file plugins/hikashoppayment/authorize/authorize.php
The problem comes from a fix we had to do for the Payeezy payment gateway.
The Payeezy payment gateway check that the amounts sent by the website match with the full total and requires that the coupon value is negative or the total doesn't match.
But it seems that this interfers Authorize.net which doesn't like negative values...
I guess we'll have to add yet another option...
In the mean time, just change the line:
Code:
$vars["x_line_item"][]='coupon<|>'.JText::_('HIKASHOP_COUPON').'<|>'.JText::_('HIKASHOP_COUPON').'<|>1<|>-'.round($order->cart->coupon->discount_value,(int)$this->currency->currency_locale['int_frac_digits']).'<|>N';
Code:
$vars["x_line_item"][]='coupon<|>'.JText::_('HIKASHOP_COUPON').'<|>'.JText::_('HIKASHOP_COUPON').'<|>1<|>'.round($order->cart->coupon->discount_value,(int)$this->currency->currency_locale['int_frac_digits']).'<|>N';
Last edit: 10 years 9 months ago by Jerome.
The following user(s) said Thank You: solia
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 1
- Thank you received: 0
10 years 9 months ago #223137
by screenbites
Replied by screenbites on topic Discount codes not working with Authorize.net
We are having the same problem. If they dont use the codes, transaction goes as planned, and notworking with coupon... ill have our IT update the cdin
Please Log in or Create an account to join the conversation.
10 years 9 months ago #223142
by Jerome
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.
Replied by Jerome on topic Discount codes not working with Authorize.net
Hi,
Nicolas already made a patch for the plugin ; so the discount will be send with the "Authorize.net" compatibility and Payzee users could have the compatibility by activating a setting in the plugin instance configuration.
And that updated plugin will be in the next HikaShop release (which should be made during this month).
Regards,
Nicolas already made a patch for the plugin ; so the discount will be send with the "Authorize.net" compatibility and Payzee users could have the compatibility by activating a setting in the plugin instance configuration.
And that updated plugin will be in the next HikaShop release (which should be made during this month).
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.
The following user(s) said Thank You: solia
Please Log in or Create an account to join the conversation.
10 years 9 months ago #224934
by solia
Replied by solia on topic Discount codes not working with Authorize.net
Thank you for this fix.
Just to note, as of today (22 Dec), downloading the current version of 2.6 did not work.
However, code edits worked just fine.
With kind regards, Nadine
Just to note, as of today (22 Dec), downloading the current version of 2.6 did not work.
However, code edits worked just fine.
With kind regards, Nadine
Please Log in or Create an account to join the conversation.
10 years 9 months ago #224954
by nicolas
Replied by nicolas on topic Discount codes not working with Authorize.net
Yes, the modification was not added to the package yet.
We'll do that today.
We'll do that today.
Please Log in or Create an account to join the conversation.
Time to create page: 0.188 seconds