|
-
I am baffled...
Hi there,
This is my first post (and first time working with flash in MANY years). I bought a flash/actionscript file for a drag and drop shopping cart. I've spent the last few days customising the file for my purposes (essentially to be able to customise my products which I have for sale, by dragging various accessories onto the product). Anyway, the file offers paypal integration via the following code:
function purchase() {
paypal = new LoadVars();
paypal.cmd = "_cart";
paypal.upload = "1";
paypal.business = "email@username";
paypal.currency_code = "USD";
for (n=0; n<cart.length && n<15; n++) {
paypal["quantity_"+(n+1)] = cart[n].qty;
paypal["item_name_"+(n+1)] = cart[n].name;
paypal["amount_"+(n+1)] = cart[n].price;
}
paypal.send("https://www.paypal.com/cgi-bin/webscr", "_blank", "POST");
}
orderform.submit.onRelease = purchase;
However, I don't want to use the cart to send to paypal, I'd quite like to take it back into my own PHP application. I've been trying and trying to no avail to get this info out of Flash and into PHP. I'm really baffled. Could anyone just show me quickly how I would get that information eg:
quantity_1=1&item_name_1=Hat&amount_1=12.99 into a post method to send to PHP? It seemed very logical to me how I would expect it to work, but everytime the PHP file just echos nothing...? I'm really hitting desperate times (and sleep depravation!)
Thanks in advance.
-
Senior Member
How is the rest o your code, AS3? This paypal code is AS2.
- The right of the People to create Flash movies shall not be infringed. -
-
Hi cancerinfom,
Thanks for your reply.
The rest of the code will be AS2, if that is. I foolishly assumed that it was AS3 (even more newbie than I thought!) Can I remove this thread and re-post in AS2?
Thanks
-
Senior Member
Moved to Actionscript forum.
- The right of the People to create Flash movies shall not be infringed. -
-
why not try:
var myUrl = "http://www.mycart.com/myphpscript.php?variable1="+flashvar1+"&variable2= "+flashvar2
getUrl(myUrl, "_Blank")
might be off on the syntax but should work...
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|