Putting a PayPal Donation Button In Flash

Submitted by:Jhon Jhon

Date added:29 May, 2011

Category:ActionScript 3

Here is the code for donating a fixed amount. This option adds an item at the dollar amount you set to the PayPal cart

Tags: donation button in flash

Code Snippet:

var variables:URLVariables = new URLVariables();
variables.cmd = "_cart";
variables.add = "1";
variables.amount = String( TOTAL DOLLAR AMOUNT HERE );
variables.business = " YOUR PAYPAL EMAIL HERE ";
variables.item_name = "Item 1";
variables.item_number = "123456789";
variables.tax = "0";
variables.currency_code = "USD";
variables.page_style = "PayPal";
variables.no_shipping = "0";
variables.undefined_quantity = "1";
variables.rn = "1";
variables.shipping = "0";
variables.shopping_url = "http://www.yourshoppingsite.com";
var request:URLRequest = new URLRequest("https://www.paypal.com/cgi-bin/webscr");
request.method = URLRequestMethod.POST;
request.data = variables;
navigateToURL(request, "_self");
 
 

Comments