Flash ActionScript3 and PayPal
This is the most simply way to implement a paypal cart, this cart only have 1 item, it can be a total price of cart and one description or 1 item and quantity of items to add to cart.
You can find more info about the parameters to send to paypal in his web
myButton.addEventListener(MouseEvent.CLICK,sendToPaypal);
myButton.buttonMode=true;
function sendToPaypal(e:Event){
var paypalRequest:URLRequest = new URLRequest(“https://www.paypal.com/es/cgi-bin/webscr”);var variables:URLVariables = new URLVariables();variables.cmd=“_xclick”;
variables.business=“your-mail@business.com”;
variables.item_name=“Description”;
variables.quantity=number-itmes-to-buy;
variables.currency_code=“EUR”;
variables.amount=price-item;
paypalRequest.data= variables
paypalRequest.method=“POST”;
try{
errorBox.htmlText=“Send data to Paypal”;navigateToURL(paypalRequest);}catch (e:Error) {
errorBox.htmlText=“ERROR”;errorBox.htmlText=e;}
}




