• Resolved cjwinternet

    (@cjwinternet)


    When using the plugin https://www.ads-software.com/support/plugin/woocommerce-bulk-discount the Paypal payment always fails for discounted items.

    [PAYMENTREQUEST_0_AMT] => 7.58
        [PAYMENTREQUEST_0_CURRENCYCODE] => GBP
        [PAYMENTREQUEST_0_SHIPPINGAMT] => 0.00
        [PAYMENTREQUEST_0_TAXAMT] => 0.00
        [PAYMENTREQUEST_0_PAYMENTACTION] => Sale
        [L_PAYMENTREQUEST_0_NAME0] => Black Twisted Vintage Cable
        [L_PAYMENTREQUEST_0_AMT0] => 3.99
        [L_PAYMENTREQUEST_0_QTY0] => 2
        [PAYMENTREQUEST_0_ITEMAMT] => 7.98

    The top line is the correct discounted amount.
    The bottom three lines are the full prices for the product.

    Obviously these don’t match £7.58 / £7.98 and the payment fails.

    Is there a workaround for this?

    Cheers

    Chris

    https://www.ads-software.com/plugins/paypal-for-woocommerce/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter cjwinternet

    (@cjwinternet)

    For information, using https://www.woothemes.com/products/paypal-express/ the payment works.

    Plugin Contributor angelleye

    (@angelleye)

    Hi, sorry for the delay getting back to you. Just noticed this thread.

    I have not worked with that plugin nor have I had any other complaints about it, so I don’t have a lot I can tell you right away.

    What I can say is that PayPal does not provide a specific parameter in their API requests for a discount. As such, what we have to do is take any discount that is applied and add it as an additional line item on the order with a negative amount. That way the math for the subtotal (ITEMAMT) will be correct and match up with the final discounted amount.

    I ran quite a bit of testing on this when using coupon codes / discounts built into the WooCommerce system by default, and this always worked as expected. From the looks of this request sample you sent, the plugin must be simply changing the price of the item on the fly as opposed to treating it as an actual WC discount. Because of that, when the system pulls data out of WC to generate the PayPal request it’s not seeing the correct data for the current order.

    I’ll download this plugin and run some tests to verify this, and then I can certainly get our plugin updated so that it works correctly when it sees this discount plugin, but it’s going to have to wait for my 1.2 release, which will most likely be another couple of months before it’s ready, unfortunately.

    I’m sorry I don’t have better immediate news for you. One thing, though, we could hope for is that the discount plugin has a setting or something we can set to make it use the actual WC discount fields instead of changing the item price on the fly..?? Do you know if it has something like that?

    Plugin Contributor angelleye

    (@angelleye)

    According to their changelog, it looks like it’s something they addressed in their 2.2 release of their Express plugin.

    I’ll have to take a look at that or just study the discount plugin to see about the best way to handle it.

    Our plugin is free, though, which makes it difficult for me to purchase paid plugins like this for study and/or testing. I’ll do my best to get it resolved ASAP.

    Plugin Contributor angelleye

    (@angelleye)

    I’m going to see if I can sneak this into my 1.1.6 update which should be released within the next couple of weeks.

    Plugin Contributor angelleye

    (@angelleye)

    Are you using the latest version of their plugin? In their FAQ it looks like there may very well be an option to apply the discount at the order level instead of the item level, and it also mentions that since 2.0 they fixed a problem where the discount was not showing up in emails or order details in WC. I’m curious if they resolved that by utilizing the actual WC discount fields, and if so, simply updating would resolve it.

    If you’re already using their latest version I’d look into that option for treating the discount at the order level instead of the item level. They seem to be referring to it in regards to variable items, but the same should apply here.

    Plugin Contributor angelleye

    (@angelleye)

    I have not heard back from you on this so I’m going to go ahead and close this ticket here. If you have more questions or concerns please submit a new ticket here.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Payment Request error’ is closed to new replies.