YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

Shipping Value Options
jsdaniel2@yahoo.com
#1 Posted : Monday, February 17, 2003 9:33:36 PM
Rank: Starting Member

Groups: Registered

Joined: 2/4/2003
Posts: 10
Location: ,
I am trying to pass the total shipping fee from my order page to PayPal. I calculate the amount based on USPS zone and weight. I have tried the following line every which way, but I am unable to pass the shipping variable. var shippingB=1.00 var shippingA=parseFloat(document.order15.shipping.value) window.open('https://www.paypal.com/cgi-bin/webscr?cmd=_cart&business=jsdaniel2@yahoo.com&shipping2='+shippingB+'&shipping='+shippingA+'&add=1') I also tried setting shipping amount equal to shipping_1. It acts as if it is not acting on this transaction. Please help.
Sponsor  
 
ron
#2 Posted : Tuesday, February 18, 2003 12:22:25 AM
Rank: Starting Member

Groups: Registered

Joined: 11/24/2002
Posts: 2,004
Location: ,
You didn't really supply enough information. Several points. What sort of error (if any) are you getting? Is it just ignoring your values? Do you have the box checked in your PayPal settings to allow shipping override?

"shippingA" and "shippingB" need to be strings in valid dollar format. Most amount variables in PayPal need to be whole integers, or 2-decimal place dollar amounts. Example, x=1.50... If x gets put into a string it is going to be "1.5" which is not a valid dollaar value.

function Dollar (val) { // force to valid dollar amount
var str,pos;
str = escape (val*1.0 + 0.005);
pos = str.indexOf (".");
if (pos > 0) str = str.substring (0, pos + 3);
return str;
}

Input is number or string, output is string.


Ron.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFVision Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF | YAF © 2003-2009, Yet Another Forum.NET
This page was generated in 0.210 seconds.