# Paypal Using as3

**URL:** <https://forum.kirupa.com/t/paypal-using-as3/298072>\
**Category:** flash\
**Created:** [October 13, 2009, 11:56am UTC](https://forum.kirupa.com/t/paypal-using-as3/298072 "2009-10-13T11:56:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaganpon](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@jaganpon](https://forum.kirupa.com/u/jaganpon)\
**Post date:** [October 13, 2009, 11:56am UTC](https://forum.kirupa.com/t/paypal-using-as3/298072/1 "2009-10-13T11:56:11Z")

</div>

Hai guys i got solution for paypal [COLOR=#008000]try this if u need it

MyButton.addEventListener(MouseEvent.CLICK, addItem);

function addItem (event:MouseEvent):void  
{  
var url:String = ‘[https://www.paypal.com/cgi-bin/webscr](https://www.paypal.com/cgi-bin/webscr)’;  
var request:URLRequest = new URLRequest(url);  
var paypal:URLVariables = new URLVariables();  
paypal[‘add’] = 1  
paypal.cmd = ‘\_cart’;  
paypal.business = ‘hawk@hawk.com’;  
paypal.item\_name = hatPageText;  
paypal.item\_number = ‘0082’;  
paypal.amount = pricePageText;  
paypal.no\_shipping = ‘1’;  
paypal.shipping = ‘2’;  
paypal.tax = ‘2’;  
[//paypal.weight](https://paypal.weight) = ‘’;  
//paypal.weight\_unit = ‘lbs’;  
paypal.undefined\_quantity =‘1’  
paypal.no\_note = ‘1’;  
paypal.currency\_code = ‘USD’;  
paypal.lc = ‘US’;  
paypal.bn = ‘PP-ShopCartBF’;  
paypal.target\_winName = ‘paypal’;  
paypal.shopping\_url = (‘[http://www.hawk.com](http://www.hawk.com)’);  
paypal.instanceName=‘MyButton’;

request.data = paypal;  
request.method = URLRequestMethod.POST;  
navigateToURL(request, ‘\_blank’);  
}

thanks for  
[http://website-dev.com/paypal-flash-button-factory.html](http://website-dev.com/paypal-flash-button-factory.html)  
[/COLOR]
