Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal App v5.000 - Problem for shipping with VAT


AndreGl

Recommended Posts

Hello!
 

The PayPal App v5.000 is realy great!
I found the update durring trying to fix a shipping vat problem in the old version.
 
Unfortunately its the same problem as before.
 
fe
The product subtotal is 5 including 19% tax and shipping is 5,90 including 19% tax
See the mail from shop.
So the system shows the user the correct amount 10,90 for authorization in both systems (paypal and shop).
 
 
Then the issue occure:
After the order is successfull the authorized amount is 9,96 (the 5€ for itemsand the net amount of the shipping)
See the mail from paypal.

post-342256-0-52182300-1487458546_thumb.png

post-342256-0-60845700-1487458546_thumb.png

Link to comment
Share on other sites

The VAT issue seems to be the only thing not working in my 2.3.4 BS Edge with paypal 5.001 now (always shows 0.00 Euro tax on the paypal site).

 

I stopped worrying about this when I discovered today that even with 'big players' where I bought stuff myself  Paypal display wrong or no tax on their site so...

Link to comment
Share on other sites

It's very interresting. I get no Problem with the new Paypal API 5.001, everything is working very well. :thumbsup:

  • The clever one learn from everything and from everybody
  • The normal one learn from his experience
  • The silly one knows everything better

[socrates, 412 before Christ]

Computers help us with the problems we wouldn't have without them!
99.9% of the bugs sit in front of the computer!
My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0

if(isset($this) || !isset($this)){ // that's the question...

 

Link to comment
Share on other sites

 

Hello!

 

The PayPal App v5.000 is realy great!
I found the update durring trying to fix a shipping vat problem in the old version.
 
Unfortunately its the same problem as before.
 
fe
The product subtotal is 5 including 19% tax and shipping is 5,90 including 19% tax
See the mail from shop.
So the system shows the user the correct amount 10,90 for authorization in both systems (paypal and shop).
 
 
Then the issue occure:
After the order is successfull the authorized amount is 9,96 (the 5€ for itemsand the net amount of the shipping)
See the mail from paypal.

 

 

The calculation for the shipping is without tax, thats why 1 euro different. 5.9 / 1.19 = 4.95798. The mail from Paypal is may be the issue

Edited by mcmannehan
  • The clever one learn from everything and from everybody
  • The normal one learn from his experience
  • The silly one knows everything better

[socrates, 412 before Christ]

Computers help us with the problems we wouldn't have without them!
99.9% of the bugs sit in front of the computer!
My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0

if(isset($this) || !isset($this)){ // that's the question...

 

Link to comment
Share on other sites

The calculation for the shipping is without tax, thats why 1 euro different. 5.9 / 1.19 = 4.95798. The mail from Paypal is may be the issue

 

I noticed this today, roo, when checking paypal sales made with my old v.2.3.1 shop. It was also wrong on the Paypal site (while correct in OSC): Paypal for some reason assumed that the shipping does not include VAT, it subtraccted the complete VAT from the product price which resulted in a wrong product net price displayed on their site. Shipping within the EU must always include VAT (with the VAT rate of the 'main' products of the shipping, I wonder what is calculated by OSC and PP when mixing items with different VAT rates in the same shipping, like eg. books (7%) and other goods (19%) [Germam tax rate]

Link to comment
Share on other sites

 

 

The calculation for the shipping is without tax, thats why 1 euro different. 5.9 / 1.19 = 4.95798. The mail from Paypal is may be the issue
 
Hello!

 

Thank you for answer...

The problem couldn't be on paypal side, because the amount on the PayPal account is later also the smaller one.
 
When you look at the paypal checkout api, you see that
1. osc send order info to paypal
2. user see order details on paypal and login and approve amount
3. paypal call osc and tell the aproved amount
4. maybe here occure the problem - osc calculate something and show the checkout confirmation page.
5. or maybe here occure the problem - on click on the final order butten the amount is send to paypal and this amount is substracted the order
Link to comment
Share on other sites

Did you activate included tax at the shipping setups in your shop?

  • The clever one learn from everything and from everybody
  • The normal one learn from his experience
  • The silly one knows everything better

[socrates, 412 before Christ]

Computers help us with the problems we wouldn't have without them!
99.9% of the bugs sit in front of the computer!
My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0

if(isset($this) || !isset($this)){ // that's the question...

 

Link to comment
Share on other sites

 

Did you activate included tax at the shipping setups in your shop?

 

 

Yes, I activate the tax in shipping module and configure the net amount.

The calculation works weel in osc. So the gross amount is shown in shipping line and the included tax is shown in the separate column.

 

The same in paypal. Shipping is shown as 5,90 for example, but after the step to osc and final request on paypal the amount is changed to net sum of shipping.

post-342256-0-58887600-1488122653_thumb.png

post-342256-0-72305600-1488122653_thumb.png

Link to comment
Share on other sites

I tested the code bit more... 

And found the problem.

 

The mistake happens in GCCV plugin from http://addons.oscommerce.com/info/9020

See checkout_process.php there...

  require(DIR_WS_CLASSES . 'order.php');
  $order = new order;

// load the before_process function from the payment modules
  $payment_modules->before_process();

// Stock Check
  $any_out_of_stock = false;
  if (STOCK_CHECK == 'true') {
    for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
      if (tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty'])) {
        $any_out_of_stock = true;
      }
    }
    // Out of Stock
    if ( (STOCK_ALLOW_CHECKOUT != 'true') && ($any_out_of_stock == true) ) {
      tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
    }
  }

  $payment_modules->update_status();

  if ( ($payment_modules->selected_module != $payment) || ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) {
    tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));
  }

  require(DIR_WS_CLASSES . 'order_total.php');
  $order_total_modules = new order_total;

  $order_totals = $order_total_modules->process();

 

The call $payment_modules->before_process(); have to be after $order_total_modules->process();.

The order_total process calculate the shipping tax and the payment before_order call paypal.

 

So if anyone else have the same problem by using "Credit Class, Gift Vouchers & Discount Coupons osC2.3.3.4" try the fix by moving this line.

post-342256-0-25391400-1488140311_thumb.png

post-342256-0-42413000-1488140311_thumb.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...