B
BaWork
I'm using the following code to calculate order amount in a payment form
for Authorize.net:
(Assume book_copies = 1 and ship_country = United States)
book_copies = request ("book_copies")
product_price = 16.95
If ship_country = "United States" then
ship_amount = 3.99
Elseif ship_country = "Canada" then
ship_amount = 3.99
Else
ship_amount = 7.99
End if
order_amount = product_price * book_copies
total_amount = (product_price * book_copies) + ship_amount
I then set the values for authorize.net as follows:
<%
Dim sequence
Dim amount
Dim ret
amount = (product_price * book_copies) + ship_amount
....... unrelated code ......
%>
NOW, my question is:
What could be the difference between the following:
amount = (product_price * book_copies) + ship_amount
(this generates an error)
and
amount = 20.94
(this works if I set the value directly)
Thanks.
Brett
(e-mail address removed)
for Authorize.net:
(Assume book_copies = 1 and ship_country = United States)
book_copies = request ("book_copies")
product_price = 16.95
If ship_country = "United States" then
ship_amount = 3.99
Elseif ship_country = "Canada" then
ship_amount = 3.99
Else
ship_amount = 7.99
End if
order_amount = product_price * book_copies
total_amount = (product_price * book_copies) + ship_amount
I then set the values for authorize.net as follows:
<%
Dim sequence
Dim amount
Dim ret
amount = (product_price * book_copies) + ship_amount
....... unrelated code ......
%>
NOW, my question is:
What could be the difference between the following:
amount = (product_price * book_copies) + ship_amount
(this generates an error)
and
amount = 20.94
(this works if I set the value directly)
Thanks.
Brett
(e-mail address removed)