Tuesday, March 30, 2010

paypal viewcart button help?!!? AS3!

viewcart_btn.addEventListener(MouseEvent.CLICK, cartClick);

function cartClick (event:MouseEvent):void
{
var url:String = 'https://www.paypal.com/cgi-bin/webscr';
var request:URLRequest = new URLRequest(url);
var paypal:URLVariables = new URLVariables();
paypal.cmd='_cart';
paypal.instanceName='viewcart_btn';

request.data = paypal;
request.method = URLRequestMethod.POST;
navigateToURL(request, '_blank');
}



I have this code and im trying to make it just view cart, but when i do a paypal window pops up saying
We have detected a problem with this shopping cart. If the problem persists, please contact the merchant.

any help?

No comments:

Post a Comment