Tax causes error "amount must be greater than zero

  • Posts: 23
  • Thank you received: 1
9 years 1 month ago #193008

EDIT: I have fixed the tax problem referred to below but still have the problem with zero amount for the store. Please see 3rd post in this thread. Didn't want you to have to read a bunch of unnecessary stuff ;)

-- HikaShop version -- : 2.3.5
-- HikaMarket version -- : 1.6.0
-- Joomla version -- : 3.4.0
-- PHP version -- : 5.4.31
-- Browser(s) name and version -- : Firefox 36.0 & Safari 6.1.6
-- Error-message(debug-mod must be tuned on) -- : "Invalid request parameter: amount must be greater than zero."
Also got "If the fractional amount is rounded for currency conversion, funds could be lost" for one test transaction but am not sure what was different about that one.

Taxes and Fees Options - Vendor Price with Tax: Yes

I need each vendor to receive the taxes paid for their sales but when Vendor Price with Tax is set to Yes, it causes an error because the system is including the main store email address with either a zero amount or even a negative amount if rounded. Each vendor needs to receive the sales tax rate x their total sales price, and the main store email shouldn't receive anything.

I sent superadmin & ftp login last night through a support form. Thanks!

    [actionType] => PAY
    [currencyCode] => USD
    [receiverList] => Array
        (
            [0] => Array
                (
                    [email] => xxxx-facilitator@xxxxx.com
                    [amount] => 0
                )

            [1] => Array
                (
                    [email] => xxxx@xxxxx.com
                    [amount] => 35
                )

            [2] => Array
                (
                    [email] => seller_1234132804_biz@xxxxx.com
                    [amount] => 85.5
                )

        )

Last edit: 9 years 1 month ago by Jerome. Reason: [code] is nice

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

  • Posts: 23
  • Thank you received: 1
9 years 1 month ago #193010

sorry - didn't mean to make this post so edited it out

Last edit: 9 years 1 month ago by lisakb. Reason: removed accidental post

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

  • Posts: 23
  • Thank you received: 1
9 years 1 month ago #193019

I believe I have the tax issue fixed (though I don't know what I did :unsure: ).

Because we're using PayPal Adaptive, though, with no fees or commissions, I still get the "amount must be greater than zero" error. I found this post that says:

Jerome wrote: If you are using paypal adaptive, all recipients should have an amount so if you are not using fees, your recipient won't have any amount and paypal will refuse it.
The plugin is configured to always put your store as the primary recipient for paypal adaptive.
I will suggest you to use the "classical" mode in the paypal adaptive plugin and use the limitation of vendors.


but the PayPal adaptive documentation on this page says "You are not required to be a receiver. For example, if you own a shopping cart, you are not required to receive payments directly. You can facilitate payments between the sender and receivers that provide the actual goods."

And it shows the following diagram of 2 recipients being paid without the store being paid:


How can I have the store not be a receiver with parallel payments as shown in their documentation & diagram above?

Thanks!

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

  • Posts: 26013
  • Thank you received: 4004
  • MODERATOR
9 years 1 month ago #193023

Hi,

If you are sure that your paypal adaptive account allow such kind of configuration, we can see to update the paypal adaptive plugin to handle that.
But when I created the paypal adaptive plugin, I once tried this kind of structure and it didn't work well.

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: 23
  • Thank you received: 1
9 years 1 month ago #193024

Hi Jerome,
Thanks for the fast reply. I'm just going by what the PayPal documentation says ;) but it would be great if you can update it. Hopefully their diagram & explanation is correct!

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

  • Posts: 26013
  • Thank you received: 4004
  • MODERATOR
9 years 1 month ago #193109

Hi,

You can see to replace in the plugin

	if(empty($this->payment_params->store_secondary) || $store_amount > 0)
		$struct['receiverList'][] = $e;
into
	if($store_amount > 0)
		$struct['receiverList'][] = $e;
It will only put the store in the list if his sum or superior than 0.
I will perform some test in order to be sure that it will not break anything for the existing configuration ; but in your case it should work.

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: 23
  • Thank you received: 1
9 years 1 month ago #193163

Thank you! I've made it to the PayPal sandbox login page w/out error; I'll let you know if I have any problems in further testing.

I appreciate your help!

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

Moderators: Obsidev
Time to create page: 0.068 seconds
Powered by Kunena Forum