十二月
23
2011

Flash 內加 PayPal Donation Button (AS3)

Shopping Cart

===========================================================

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.ononpig.com";
var request:URLRequest = new URLRequest("https://www.paypal.com/cgi-bin/webscr");
request.method = URLRequestMethod.POST;
request.data = variables;
navigateToURL(request, "_self");

Donation Button

===========================================================

var variables:URLVariables = new URLVariables();
variables.cmd = "_donations";
variables.add = "1";
variables.business = "YOUR PAYPAL EMAIL GOES HERE";
variables.item_name = "Donation to Salvation Army";
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.ononpig.com";
var request:URLRequest = new URLRequest("https://www.paypal.com/cgi-bin/webscr");
request.method = URLRequestMethod.POST;
request.data = variables;
navigateToURL(request, "_self");

Related Posts

About the Author:

Leave a comment