- Posts: 25
- Thank you received: 1
Paypal xfer of Shipping and Handling
11 years 8 months ago #186145
by wayneft
Paypal xfer of Shipping and Handling was created by wayneft
-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.5.15
-- Browser(s) name and version -- : Chrome
Do any of the Paypal plugins correctly transfer the Shipping and Handling field to Paypal? Currently what I see is the shipping option (usps) and amount transferred to Paypal as a separate line item in the shopping cart. As you can see in the picture the Shipping and/or Handling field(s) are blank.
This really wreaks havoc when I export the order from Paypal to ShipStation on international orders. The reason being is the shipping line item shows up on the customs form as merchandise because it was not originally in the SHipping field in Paypal.
Any help on this issue would be greatly appreciated.
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.5.15
-- Browser(s) name and version -- : Chrome
Do any of the Paypal plugins correctly transfer the Shipping and Handling field to Paypal? Currently what I see is the shipping option (usps) and amount transferred to Paypal as a separate line item in the shopping cart. As you can see in the picture the Shipping and/or Handling field(s) are blank.
This really wreaks havoc when I export the order from Paypal to ShipStation on international orders. The reason being is the shipping line item shows up on the customs form as merchandise because it was not originally in the SHipping field in Paypal.
Any help on this issue would be greatly appreciated.
Please Log in or Create an account to join the conversation.
11 years 8 months ago #186151
by nicolas
Replied by nicolas on topic Paypal xfer of Shipping and Handling
Hi,
We do that because PayPal doesn't support taxes on the shipping fees and HikaShop does. So we have to put the shipping fees as a product line, otherwise, we wouldn't be able to add the tax on the shipping and the total would be wrong and it wouldn't work.
What you can do is change the code:
to:
in the file plugins/hikashoppayment/paypal/paypal.php
However, that means that if you have taxes on shipping, it will probably not work properly.
We do that because PayPal doesn't support taxes on the shipping fees and HikaShop does. So we have to put the shipping fees as a product line, otherwise, we wouldn't be able to add the tax on the shipping and the total would be wrong and it wouldn't work.
What you can do is change the code:
Code:
$vars['item_name_' . $i] = JText::_('HIKASHOP_SHIPPING');
$vars['amount_' . $i] = round($order->order_shipping_price - @$order->order_shipping_tax, (int)$this->currency->currency_locale['int_frac_digits']);
$tax += round($order->order_shipping_tax, (int)$this->currency->currency_locale['int_frac_digits']);
$vars['quantity_' . $i] = 1;
$i++;
Code:
$vars['shipping'] = round($order->order_shipping_price, (int)$this->currency->currency_locale['int_frac_digits']);
However, that means that if you have taxes on shipping, it will probably not work properly.
Please Log in or Create an account to join the conversation.
11 years 8 months ago #189104
by wayneft
Replied by wayneft on topic Paypal xfer of Shipping and Handling
So I finally got around to testing the code but it does not work. It does not send any shipping information to Paypal. Even on the Paypal log in screen, there is no shipping and handling total.
Please Log in or Create an account to join the conversation.
11 years 8 months ago #189105
by nicolas
Replied by nicolas on topic Paypal xfer of Shipping and Handling
Hi,
I don't see why this code change wouldn't work. I did it per PayPal's documentation on the available variables for the redirection form:
developer.paypal.com/docs/classic/paypal...ndard_htmlvariables/
I don't see why this code change wouldn't work. I did it per PayPal's documentation on the available variables for the redirection form:
developer.paypal.com/docs/classic/paypal...ndard_htmlvariables/
Please Log in or Create an account to join the conversation.
11 years 7 months ago #189954
by wayneft
Replied by wayneft on topic Paypal xfer of Shipping and Handling
So I played around with this some more and found the problem. You ave to use the code:
because "shipping' only applies to a single item whereas 'handling_cart' applies to the whole cart.
You should really consider adding this to the Paypal plugin. You mentioned earlier that the reason you don't do it is because Paypal does support tax on shipping fees, however that is not the case. When you set up your tax profile in Paypal there is a field that asks you if you want to tax shipping and handling so it should work fine. Thanks for the help.
Code:
$vars['handling_cart'] = round($order->order_shipping_price, (int)$this->currency->currency_locale['int_frac_digits']);
because "shipping' only applies to a single item whereas 'handling_cart' applies to the whole cart.
You should really consider adding this to the Paypal plugin. You mentioned earlier that the reason you don't do it is because Paypal does support tax on shipping fees, however that is not the case. When you set up your tax profile in Paypal there is a field that asks you if you want to tax shipping and handling so it should work fine. Thanks for the help.
Please Log in or Create an account to join the conversation.
11 years 7 months ago #189963
by nicolas
Replied by nicolas on topic Paypal xfer of Shipping and Handling
Thank you for your feedback with the "handling_cart" parameter.
You shouldn't do add taxes for shipping in your PayPal acocunt. If you do that, the total of the order will be different between HikaShop and PayPal and HikaShop will refuse the payment notification from PayPal. That's a necessary check done on the payment notification in order to avoid payment fraud and also to keep consistency between what you have on file on your website for the invoice and what the user paid on the payment gateway.
Believe me, we had a good reason to do it that way.
You shouldn't do add taxes for shipping in your PayPal acocunt. If you do that, the total of the order will be different between HikaShop and PayPal and HikaShop will refuse the payment notification from PayPal. That's a necessary check done on the payment notification in order to avoid payment fraud and also to keep consistency between what you have on file on your website for the invoice and what the user paid on the payment gateway.
Believe me, we had a good reason to do it that way.
Please Log in or Create an account to join the conversation.
Time to create page: 0.199 seconds