2 Replies Latest reply on Sep 15, 2010 11:44 AM by ScottFriebel

    Flex security error

    ScottFriebel Level 1

      Hello,

      I am working on a flex based cart system that will allow the user to input their cc info directly into the flex app then process the payment behind the scenes using payflow pro. I am getting this security error and can't seem to find the solution. Any help would be appreciated.

       

      Error - "Error #2170: Security sandbox violation:https://www.mysite.com/Checkout.swf cannot send HTTP headers tohttps://pilot-payflowpro.paypal.com"

       

      My code -

       

       

      req = new URLRequest("https://pilot-payflowpro.paypal.com");

      req.method = URLRequestMethod.POST;

      req.contentType = "text/namevalue";

       

      var header:URLRequestHeader = new URLRequestHeader("X-VPS-REQUEST-ID", theID);

      var header2:URLRequestHeader = new URLRequestHeader("X-VPS-CLIENT-TIMEOUT", "40");

      req.requestHeaders.push(header, header2);

       

       

      vars = new URLVariables();

      vars.TRXTYPE = "S";

      vars.ACCT = CreditCard.text;

      vars.EXPDATE = ExpMonth.selectedItem.data + ExpYear.selectedItem.data;

      vars.TENDER = "C";

      vars.VENDOR = "MyVendorName";

      vars.USER = "MyUser";

      vars.PWD = "MyPassword";

      vars.PARTNER = "PayPal";

      req.data = vars;

      req.data += theOrderTotal;

       

       

      var loader:URLLoader = new URLLoader();

      loader.dataFormat = URLLoaderDataFormat.VARIABLES;

      loader.addEventListener(Event.COMPLETE, gotPaymentResponse);

      loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, serror);

      loader.addEventListener(IOErrorEvent.IO_ERROR, ioerror);

      loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, status);

      loader.load(req);

       

       

      Thanks again,

      Scott