<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Magento 2 - Issues with coupon / vouchers in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Magento-2-Issues-with-coupon-vouchers/m-p/69340#M42384</link>
    <description>&lt;P&gt;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/26959"&gt;@Renaissance&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="login-bold"&gt;I found the problem with this... It is in the magento-module-core/gateway/request/AbstractRequestBuilder.php; function prepareLineItem where it setUnitPrice&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="login-bold"&gt;It is calling the $item-&amp;gt;getBasePriceInclTax() - $item-&amp;gt;getBaseDiscountAmount(). The base discount amount is the discount amount of the whole line item.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="login-bold"&gt;Let's say if my item is $2.03 and it has 48 quantity in the line item. Then the total will be 97.44. But after 10% discount which is $9.74, I received the error -7.71 is invalid from Authorize Net.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="login-bold"&gt;It was -7.71 because it uses the BasePriceIncludeTax - BaseDiscountAmount ( 2.03 - 9.74)&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Oct 2019 18:51:27 GMT</pubDate>
    <dc:creator>gakon104110</dc:creator>
    <dc:date>2019-10-10T18:51:27Z</dc:date>
    <item>
      <title>Magento 2 - Issues with coupon / vouchers</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Magento-2-Issues-with-coupon-vouchers/m-p/68597#M41770</link>
      <description>&lt;P&gt;when ever we've got a transaction with a coupon we get an error such as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'code' =&amp;gt; 'E00003',&lt;BR /&gt;'text' =&amp;gt; 'The \'AnetApi/xml/v1/schema/AnetApiSchema.xsd:unitPrice\' element is invalid - The value &amp;amp;#39;-78.05&amp;amp;#39; is invalid according to its datatype \'Decimal\' - The MinInclusive constraint failed.',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am guessing the extension is added an itemline for the discount, which gets refused due to it being a negative value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is causing a huge headache..&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 21:43:38 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Magento-2-Issues-with-coupon-vouchers/m-p/68597#M41770</guid>
      <dc:creator>asurrey</dc:creator>
      <dc:date>2019-07-30T21:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Magento 2 - Issues with coupon / vouchers</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Magento-2-Issues-with-coupon-vouchers/m-p/68601#M41774</link>
      <description>&lt;P&gt;The xsd is available here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://apitest.authorize.net/xml/v1/schema/AnetApiSchema.xsd" target="_blank" rel="noopener"&gt;https://apitest.authorize.net/xml/v1/schema/AnetApiSchema.xsd&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I'm not allowed to copy the element code here - but you can search the xsd in a browser for "unitPrice". unitPrice has a minimum of 0.00.&lt;/P&gt;&lt;DIV class="line"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="line"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 30 Jul 2019 22:41:15 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Magento-2-Issues-with-coupon-vouchers/m-p/68601#M41774</guid>
      <dc:creator>mmcguire</dc:creator>
      <dc:date>2019-07-30T22:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: Magento 2 - Issues with coupon / vouchers</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Magento-2-Issues-with-coupon-vouchers/m-p/68605#M41777</link>
      <description>&lt;P&gt;I'm aware of that, but I have no idea where this negative value is coming from.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All the products have positive values inside magento - the anet log doesn't log unitPrice so I can't tell which row has the negative value, or why it's negative. It's shouldn't be...&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2019 10:21:41 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Magento-2-Issues-with-coupon-vouchers/m-p/68605#M41777</guid>
      <dc:creator>asurrey</dc:creator>
      <dc:date>2019-07-31T10:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: Magento 2 - Issues with coupon / vouchers</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Magento-2-Issues-with-coupon-vouchers/m-p/68607#M41779</link>
      <description>&lt;P&gt;Same orders work fine with paypal and other payment methods, if we use a coupon code with this anet extension we get issues with negative values of unitPrice as stated above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this must be related to the extenion.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2019 11:49:50 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Magento-2-Issues-with-coupon-vouchers/m-p/68607#M41779</guid>
      <dc:creator>asurrey</dc:creator>
      <dc:date>2019-07-31T11:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: Magento 2 - Issues with coupon / vouchers</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Magento-2-Issues-with-coupon-vouchers/m-p/68608#M41780</link>
      <description>&lt;P&gt;We're using it on Magento 2.2.5&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2019 11:50:23 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Magento-2-Issues-with-coupon-vouchers/m-p/68608#M41780</guid>
      <dc:creator>asurrey</dc:creator>
      <dc:date>2019-07-31T11:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Magento 2 - Issues with coupon / vouchers</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Magento-2-Issues-with-coupon-vouchers/m-p/69075#M42166</link>
      <description>&lt;P&gt;Have you found the solution for this problem yet?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2019 05:01:18 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Magento-2-Issues-with-coupon-vouchers/m-p/69075#M42166</guid>
      <dc:creator>gakon104110</dc:creator>
      <dc:date>2019-09-13T05:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Magento 2 - Issues with coupon / vouchers</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Magento-2-Issues-with-coupon-vouchers/m-p/69093#M42181</link>
      <description>&lt;P&gt;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/32752"&gt;@gakon104110&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I haven't seen this software or the issue, but I can tell you that the root cause is a discount being treated as if a product. UnitPrice is a property of line items.&amp;nbsp; You would need the discount to be reflected somewhere other than the line items of the order. You may want to apply the discount to the line item directly, for instance instead of-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Widget&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$10.00&lt;/P&gt;&lt;P&gt;Widget discount -$1.00&lt;/P&gt;&lt;P&gt;Order total&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$9.00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may want-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Widget (10% discount applied) $9.00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the 10% can be added to the item description.&amp;nbsp; How to integrate that with your specific magento I do not know, but that is the nuts and bolts of what is supposed to happen.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Sep 2019 08:59:41 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Magento-2-Issues-with-coupon-vouchers/m-p/69093#M42181</guid>
      <dc:creator>Renaissance</dc:creator>
      <dc:date>2019-09-15T08:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: Magento 2 - Issues with coupon / vouchers</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Magento-2-Issues-with-coupon-vouchers/m-p/69107#M42194</link>
      <description>&lt;P&gt;Searching for the same. I tried every single option, but not finding anything.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;_____________________________________________________________________&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;A href="https://thermostats.me/honeywell-wifi-thermostat-reviews/" target="_blank" rel="noopener"&gt;Honeywell Wifi Thermostats&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 12:06:42 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Magento-2-Issues-with-coupon-vouchers/m-p/69107#M42194</guid>
      <dc:creator>MiYosa51</dc:creator>
      <dc:date>2019-09-16T12:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: Magento 2 - Issues with coupon / vouchers</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Magento-2-Issues-with-coupon-vouchers/m-p/69337#M42381</link>
      <description>&lt;P&gt;Somehow this is related to the Coupon Code with Freeshipping.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Normal coupon code works fine. I guess we have to handle the logic in Magento then, unless you have any other suggestion&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 15:51:47 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Magento-2-Issues-with-coupon-vouchers/m-p/69337#M42381</guid>
      <dc:creator>gakon104110</dc:creator>
      <dc:date>2019-10-10T15:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Magento 2 - Issues with coupon / vouchers</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Magento-2-Issues-with-coupon-vouchers/m-p/69340#M42384</link>
      <description>&lt;P&gt;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/26959"&gt;@Renaissance&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="login-bold"&gt;I found the problem with this... It is in the magento-module-core/gateway/request/AbstractRequestBuilder.php; function prepareLineItem where it setUnitPrice&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="login-bold"&gt;It is calling the $item-&amp;gt;getBasePriceInclTax() - $item-&amp;gt;getBaseDiscountAmount(). The base discount amount is the discount amount of the whole line item.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="login-bold"&gt;Let's say if my item is $2.03 and it has 48 quantity in the line item. Then the total will be 97.44. But after 10% discount which is $9.74, I received the error -7.71 is invalid from Authorize Net.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="login-bold"&gt;It was -7.71 because it uses the BasePriceIncludeTax - BaseDiscountAmount ( 2.03 - 9.74)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 18:51:27 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Magento-2-Issues-with-coupon-vouchers/m-p/69340#M42384</guid>
      <dc:creator>gakon104110</dc:creator>
      <dc:date>2019-10-10T18:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: Magento 2 - Issues with coupon / vouchers</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Magento-2-Issues-with-coupon-vouchers/m-p/69343#M42387</link>
      <description>&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/32752"&gt;@gakon104110&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;Then it sounds like your solution is to pull in the item quantity or set your discount as a percent value in the calculation.</description>
      <pubDate>Thu, 10 Oct 2019 20:01:02 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Magento-2-Issues-with-coupon-vouchers/m-p/69343#M42387</guid>
      <dc:creator>Renaissance</dc:creator>
      <dc:date>2019-10-10T20:01:02Z</dc:date>
    </item>
  </channel>
</rss>

