eCart not passing Discount to PayPal
We're using ASP/VBScript, DW 8.0.2 and eCart 4.5.2.
We have the following form submitting to PayPal from our view-basket.asp page:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="ourpaypalaccount@ourdomain.com">
<%SFCcart_Index = SFCcart.DisplayIndex - 2%>
<%
while (NOT WA_eCart_EOF(SFCcart))
%>
<%SFCcart_Index = SFCcart_Index + 1%>
<% 'WA eCart Validation
if ((WA_eCart_FormatNumber(WA_eCart_DisplayInfo(SFCcart, "Price") - ((WA_eCart_DisplayInfo(SFCcart, "Price")/WA_eCart_TotalColumn(SFCcart, "TotalPrice")) * WA_eCart_GetDiscounts(SFCcart)), false, 2) > 0)) then
%>
<input type="hidden" name="item_name_<%=SFCcart_Index+1%>" value="<%=WA_eCart_DisplayInfo(SFCcart, "Name")%><%IF WA_eCart_DisplayInfo(SFCcart, "Colour") <> "" Then%> (<%=WA_eCart_DisplayInfo(SFCcart, "Color")%>)<%End IF%><%IF WA_eCart_DisplayInfo(SFCcart, "Size") <> "" Then%> (<%=WA_eCart_DisplayInfo(SFCcart, "Size")%>)<%End IF%>">
<input type="hidden" name="amount_<%=SFCcart_Index+1%>" value="<%=WA_eCart_DisplayInfo(SFCcart, "Price")%>">
<input type="hidden" name="quantity_<%=SFCcart_Index+1%>" value="<%=WA_eCart_DisplayInfo(SFCcart, "Quantity")%>">
<% 'WA eCart Validation
else
SFCcart_Index = SFCcart_Index - 1
end if
%>
<%
set SFCcart = WA_eCart_MoveNext(SFCcart)
wend
set SFCcart = WA_eCart_MoveFirst(SFCcart)
%>
<input type="hidden" name="shipping_1" value="5">
<input type="hidden" name="shipping2_1" value="0">
<input type="hidden" name="currency_code" value="GBP">
<input name="CheckoutButton" type="image" value="Proceed to Checkout" src="stranraer-fc/btn-checkout.png" onmouseover="this.src='stranraer-fc/btn-checkouton.png'" onmouseout="this.src='stranraer-fc/btn-checkout.png'" alt="Proceed to secure checkout" border="0" />
</form>
We have a discount rule set up in our cart to deduct 10% from the sub-total amount, to give us a grand total, but we've noticed that this amount isn't being passed to PayPal. Instead, our form is simply passing the individual product prices to PayPal.
How do we pass the individual items to PayPal whilst, at the same time, passing the correct grand total amount (sub-total - discounts)?
Again, I've attached our view-basket.asp page and cart files.
Thank you.
Regards
nath.