Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0

Reply
 
Thread Tools Rate Thread Display Modes
Old 06-11-2012, 01:41 AM   #11
iamgotenks
Super Saiyan
 
iamgotenks's Avatar
 
Join Date: Nov 2011
Location: New Zealand
Posts: 299
Default

well, I don't know what you're code is really meant to do, and i can't see the other code to see what is actually happening.
iamgotenks is offline   Reply With Quote
Old 06-11-2012, 01:52 AM   #12
cjm
Registered User
 
Join Date: Jun 2012
Posts: 9
Default

It's only giving me one output showing the end of the array.
It's for a paypal checkout. I will need to start at item_1. I'll be happy to share the complete code with you if you want.

ActionScript Code:
for(var n:int = 1; n < cartList.length; n++)             { trace(cartList.getItemAt(n).label) // Here you define the URL address you want to connect to var url:String = "PAYPAL SITE"; // Define the URLRequest object and use url string from above var payPal:URLRequest = new URLRequest(url); //  Set up URL variables object and start claiming all variable names and value pairs //  See paypal documentation for adjustments in these name value pairs as you need them var variables:URLVariables = new URLVariables(); variables.cs = n; variables.cmd = "_cart"; variables.upload = n; variables.business = "[email protected]"; // your merchant email at paypal                    // Assign a variable name for our URLVariables object var phpVariables:URLVariables = new URLVariables(); // Build the varSend variable // Be sure you place the proper location reference to your PHP config file here var varSend:URLRequest = new URLRequest("SITE"); varSend.method = URLRequestMethod.POST; varSend.data = phpVariables; // Build the varLoader variable var varLoader:URLLoader = new URLLoader; varLoader.dataFormat = URLLoaderDataFormat.VARIABLES;              trace("item_name_" + n); variables["item_name_" + n] = list.selectedItem.TitleLabel; variables["amount_" + n] = list.selectedItem.Price; //variables.amount_1 = list.selectedItem.Price; // Set the price here phpVariables.songPriceL1 = list.selectedItem.Price;                    // Place all the variables above into a data packet of the URLRequest var payPal.data = variables; //Set the method to be 'POST' for sending the variables to paypal server //payPal.method = URLRequestMethod.POST; // And finally we navigate to the PayPal Gateway Page for your biz navigateToURL(payPal, "_new"); // Same window method, no popup(recommended) // Send the data to the php file varLoader.load(varSend);

Last edited by cjm; 06-11-2012 at 02:03 AM.
cjm is offline   Reply With Quote
Old 06-11-2012, 02:19 AM   #13
cjm
Registered User
 
Join Date: Jun 2012
Posts: 9
Default

I figured it out. It was something wrong with the others.
Thank you iamgotenks! You have been a great help.
cjm is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:47 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.