VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Payment VM 1.1 => PayPal / PayPal Pro VM 1.1 => Topic started by: Jan1812 on September 09, 2011, 15:46:05 PM

Title: Payment received by PayPal & shipping costs
Post by: Jan1812 on September 09, 2011, 15:46:05 PM
We have a joomla site which includes a shop (virtuamart).
The site works fine! We have a problem with paypal.
The price of the item on the order of joomla and on receipt of paypal payment, there's a difference. This is also true for the shipping. See attachment!
Why is this and how do I fix this?

[attachment cleanup by admin]
Title: Re: Payment received by PayPal & shipping costs
Post by: Jan1812 on September 11, 2011, 14:18:21 PM
hi,

should i up-grade to 1.1.9 OR 2.0?
do they have that problem?
because 1.1.5 does!
pls help

grtz
Title: Re: Payment received by PayPal & shipping costs
Post by: stinga on September 11, 2011, 16:13:25 PM
Not sure I understand the problem.
Those images are very blurry and difficult to read.
Maybe some screen shots of the order and the PP screen?
What is the difference in price?
Title: Re: Payment received by PayPal & shipping costs
Post by: Jan1812 on September 11, 2011, 19:37:26 PM
thx for the reply!
I'll tell you about it:


Order:
Price: €95  Shipping: €8  Tax: €17,88  Total: €103

Paypal:
Price: €96,39  Shipping: €6.61  Total: €103

So, that's my problem.
Why is there a difference?
Can you help me pls?
Title: Re: Payment received by PayPal & shipping costs
Post by: jameel on September 16, 2011, 11:24:59 AM
This is due to the tax is being divided into the shipping and item price
Title: Re: Payment received by PayPal & shipping costs
Post by: Jan1812 on September 22, 2011, 13:00:18 PM
Stinga & Jameel,

can you fix this pls?
Title: Re: Payment received by PayPal & shipping costs
Post by: stinga on September 23, 2011, 00:37:32 AM
What needs fixing, there is nothing wrong.
Title: Re: Payment received by PayPal & shipping costs
Post by: Jan1812 on September 23, 2011, 12:28:07 PM
Did you read my post above?
Why is there a diffrence?

Jan
Title: Re: Payment received by PayPal & shipping costs
Post by: stinga on September 25, 2011, 21:16:38 PM
I think what you mean is...
'How do I show the tax in PayPal"

There is nothing wrong with the amount you are sending to PayPal.
Title: Re: Payment received by PayPal & shipping costs
Post by: Jan1812 on September 26, 2011, 14:19:26 PM
I think you're right!
What do i have to do to make it right?
Title: Re: Payment received by PayPal & shipping costs
Post by: stinga on September 27, 2011, 15:41:21 PM
You need to send the tax amount to PP in the the correct field name and you will need to mod the payment extra info field to get J!/VM to send the data to PP.
Title: Re: Payment received by PayPal & shipping costs
Post by: Jan1812 on September 27, 2011, 18:13:54 PM
Stinga,
thank you so much for your patience with me.
I am very new to this area.
Would you tell me exactly what to do in PP & VM?
Step by step pls
Title: Re: Payment received by PayPal & shipping costs
Post by: stinga on September 28, 2011, 10:20:17 AM
If you are not getting the tax you will need to alter code, have a look at the extra payment info in the PP setup on VM and see if tax is being sent.
This is PHP code, have a look and see if it makes sense, if it does not make sense then it would be better to ask someone to do the job for you.
You could paste the code here and see if someone can help you.
Title: Re: Payment received by PayPal & shipping costs
Post by: Jan1812 on September 29, 2011, 15:22:52 PM
<?php
$db1 = new ps_DB();
$q = "SELECT country_2_code FROM #__vm_country WHERE country_3_code='".$user->country."' ORDER BY country_2_code ASC";
$db1->query($q);

$url = "https://www.paypal.com/cgi-bin/webscr";
$tax_total = $db->f("order_tax") + $db->f("order_shipping_tax");
$discount_total = $db->f("coupon_discount") + $db->f("order_discount");
$post_variables = Array(
"cmd" => "_ext-enter",
"redirect_cmd" => "_xclick",
"upload" => "1",
"business" => PAYPAL_EMAIL,
"receiver_email" => PAYPAL_EMAIL,
"item_name" => $VM_LANG->_('PHPSHOP_ORDER_PRINT_PO_NUMBER').": ". $db->f("order_id"),
"order_id" => $db->f("order_id"),
"invoice" => $db->f("order_number"),
"amount" => round( $db->f("order_total")-$db->f("order_shipping"), 2),
"shipping" => sprintf("%.2f", $db->f("order_shipping")),
"currency_code" => $_SESSION['vendor_currency'],

"address_override" => "1",
"first_name" => $dbbt->f('first_name'),
"last_name" => $dbbt->f('last_name'),
"address1" => $dbbt->f('address_1'),
"address2" => $dbbt->f('address_2'),
"zip" => $dbbt->f('zip'),
"city" => $dbbt->f('city'),
"state" => $dbbt->f('state'),
"country" => $db1->f('country_2_code'),
"email" => $dbbt->f('user_email'),
"night_phone_b" => $dbbt->f('phone_1'),
"cpp_header_image" => $vendor_image_url,

"return" => SECUREURL ."index.php?option=com_virtuemart&page=checkout.result&order_id=".$db->f("order_id"),
"notify_url" => SECUREURL ."administrator/components/com_virtuemart/notify.php",
"cancel_return" => SECUREURL ."index.php",
"undefined_quantity" => "0",

"test_ipn" => PAYPAL_DEBUG,
"pal" => "NRUBJXESJTY24",
"no_shipping" => "1",
"no_note" => "1"
);
if( $page == "checkout.thankyou" ) {
$query_string = "?";
foreach( $post_variables as $name => $value ) {
$query_string .= $name. "=" . urlencode($value) ."&";
}
vmRedirect( $url . $query_string );
} else {
echo '<form action="'.$url.'" method="post" target="_blank">';
echo '<input type="image" name="submit" src="https://www.paypal.com/en_US/i/btn/x-click-but6.gif" alt="Click to pay with PayPal - it is fast, free and secure!" />';

foreach( $post_variables as $name => $value ) {
echo '<input type="hidden" name="'.$name.'" value="'.htmlspecialchars($value).'" />';
}
echo '</form>';

}
?>
Title: Re: Payment received by PayPal & shipping costs
Post by: Jan1812 on September 30, 2011, 14:56:37 PM
Stinga,

will you or sombody else fix this pls?
In the PHP do i need to fill something else in?

Title: Re: Payment received by PayPal & shipping costs
Post by: stinga on October 02, 2011, 11:27:16 AM
Cam you repost the screen shots so we can see what is happening.
Title: Re: Payment received by PayPal & shipping costs
Post by: Jan1812 on October 02, 2011, 14:10:16 PM
http://www.juweliers-vandeweyer.be/home/gg (http://www.juweliers-vandeweyer.be/home/gg)
follow this link for the pictures!
Title: Re: Payment received by PayPal & shipping costs
Post by: stinga on October 02, 2011, 18:48:26 PM
Which is which? and can you translate please...
Title: Re: Payment received by PayPal & shipping costs
Post by: Jan1812 on October 02, 2011, 21:21:41 PM
the first is "order"
aantal - number
naam - name
art.nr - item number
prijs - price
subtotaal - subtotal
verzend. handelingskosten - shipping
btw - tax
totaal - total

2nd "paypal"
omschrijving - description
ordernummer - order number
prijs per eenheid - unit price
bedrag - amount
subtotaal - subtotal
verzending - shipping
totaal - total
betaling - payment
Title: Re: Payment received by PayPal & shipping costs
Post by: stinga on October 02, 2011, 23:25:08 PM
G'day,

after
"amount" => round( $db->f("order_total")-$db->f("order_shipping"), 2),
try adding
"tax_cart" => $tax_total,

And see if that gives you what you need.
Title: Re: Payment received by PayPal & shipping costs
Post by: Jan1812 on October 03, 2011, 16:00:15 PM
I think it's solved!
Check here http://www.juweliers-vandeweyer.be/home/new (http://www.juweliers-vandeweyer.be/home/new)
First is "PP"
2nd is "order"

I thank you very much!
Title: Re: Payment received by PayPal & shipping costs
Post by: Jan1812 on October 04, 2011, 15:43:35 PM
the links are not valid anymore!