Link to home
Start Free TrialLog in
Avatar of Bruce Gust
Bruce GustFlag for United States of America

asked on

Sending variables to Paypal using Flash CS4

I've got to convert a button that I've built into one whose script accommodates the posting of variables to Paypal. I've done this before, but I'm stuck.

Here's my code:

on (release) {
      getURL("https://www.paypal.com/cgi-bin/webscr", "_blank", "POST");
}
Avatar of sjklein42
sjklein42
Flag of United States of America image

I think you're basically there.  Use argument getURL's fourth argument to pass the POST CGI parameters.  Concatenate them with "&" characters.

PayPal has documented a long list of webscr CGI parameters which you are probably already familiar with.

If you're submitting an order by redirecting to PayPal, for example, the request would look like this:

 getURL("https://www.paypal.com/cgi-bin/webscr", "_blank", "POST",
    "cmd=_xclick&cn=MyCompany&invoice=123......"  );

PayPal should pop up in a new window with prepopulated fields based on your CGI parms.
Avatar of Bruce Gust

ASKER

Hey, friend!

I'm missing it somehow. I took your code as it was documented above (and you probably just meant it as a starting point), but I got this error:

Wrong number of parameters: getURL requires between 1 and 3

What am I missing?
Basically, what's happening is when I try to introduce the variables, I'm getting hung up.

How do I declare a variable? I'm used to ASII, ASIII is throwing me, I guess...
ASKER CERTIFIED SOLUTION
Avatar of sjklein42
sjklein42
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial