4 Replies Latest reply on Jun 6, 2016 11:29 PM by shamy90825337

    Flex Mobile PayPal sandbox error



                   we have implemented the PayPal express checkout in our ASP.Net project, which gives service to our Flex Project.  The PayPal express checkout works successfully in this Flex project so we want to implement PayPal express checkout in our Flex Mobile Project using ASP.Net service.

      We have tried to implement in Flex Mobile Project as below, which opens the paypal site.

            var webView:StageWebView = new StageWebView();

            webView.viewPort = new Rectangle( 0, 0, this.stage.stageWidth, this.stage.stageHeight);

            webView.stage = this.stage;




        But when I replace the url by https://www.sandbox.paypal.com/in/webapps/mpp/merchant it shows the error as “Error #2044: Unhandled ErrorEvent:. text=Load error.”  We are not able to navigate to the sandbox url as we want to check the payment in sandbox.
      Is anyone getting error for SandBox URL for Flex Mobile project ?  Is there any other best way to implement PayPal payment gateway in Flex Mobile Project?

        • 1. Re: Flex Mobile PayPal sandbox error

          I can not reproduce this error. We call the PayPal Sandbox via the StageWebView too - but not directly, we use a HTML-Site wich contains the PayPal-Sandbox-Button.

          You can try to create the StageWebView with "true" in the constructor. Since Air 19.x the StageWebView uses the locally installed default web browser in this case. Perhaps the StageWebView behaves different then:

          private var webView:StageWebView = new StageWebView(true);

          Install an event listener for the error event of the StageWebView and you may receive more details about the error:
          webView.addEventListener (ErrorEvent.ERROR, onError);
          function onError (e: ErrorEvent): void {



          • 2. Re: Flex Mobile PayPal sandbox error
            shamy90825337 Level 1

                           Thanks for the reply, now I have created the object of StageWebView with "true" in the constructor but is shows the error as "1137: Incorrect number of arguments. Expected no more than 0.".  I have added the event listener for error still it shows the error as “Error #2044: Unhandled ErrorEvent:. text=Load error.”. 

            We are using the software versions as below:

            Adobe Flash Builder 4.5

            Adobe Flash Player 19 ActiveX

            Adobe Flash Player 19 NPAPI

            Can you please tell us how to check Air 19.x version?

            • 3. Re: Flex Mobile PayPal sandbox error
              alb6286073 Level 1

              We use the new Versin of Adobe Air:




              We use also the latest SDK for Adobe Flex:




              If you installed the Apache Flex SDK 4.15 you have to set it in your





              After updating the SDK, update the AIR namespace in the project's

              application descriptor to the correct version.


              For example: :


              Flex Mobile PayPal sandbox error created by shamy90825337

              <https://forums.adobe.com/people/shamy90825337> in Flex - View the full

              discussion <https://forums.adobe.com/message/8789530#8789530>


              • 4. Re: Flex Mobile PayPal sandbox error
                shamy90825337 Level 1

                                hi, we have not read any document stating that Flex Mobile Project requires Adobe Air, so we haven't used Adobe Air for our project. We have not used Apache Flex SDK in our project.  The source code to navigate to the the paypal sandbox is as below, and this throws error as "Error #2044: Unhandled ErrorEvent:. text=Load error.". 



                <?xml version="1.0" encoding="utf-8"?>

                <s:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009" addedToStage="viewnavigatorapplication1_addedToStageHandler(event)"

                xmlns:s="library://ns.adobe.com/flex/spark" firstView="views.iRing31HomeView"                                           


                    <fx:Style source="styles/Main.css" />   



                            import mx.events.FlexEvent;

                            import mx.rpc.events.FaultEvent;

                            import mx.rpc.events.ResultEvent;           

                            import views.New1;

                            public var MainServiceURL:String;

                            public var SessionServiceURL:String;

                            public var LoginURL:String;

                            public var SignUpURL:String;

                            public var ForgotPasswordURL:String;

                            public var LogoutURL:String;

                            public var SubscriptionURL:String;           

                            import flash.desktop.NativeApplication;

                            import flash.display.MovieClip;

                            import flash.events.KeyboardEvent;

                            import flash.geom.Rectangle;

                            import flash.media.StageWebView;

                            import flash.net.URLRequest;

                            import flash.net.navigateToURL;

                            import flash.ui.Keyboard;


                            protected function viewnavigatorapplication1_addedToStageHandler(event:Event):void


                                var webView:StageWebView = new StageWebView();

                                webView.loadURL(" https://www.sandbox.paypal.com/in/webapps/mpp/merchant");

                                webView.stage = this.stage;               

                                webView.viewPort = new Rectangle( 0, 0, stage.stageWidth, stage.stageHeight);   

                                webView.addEventListener(ResultEvent.RESULT, abc_resultHandler );

                                webView.addEventListener(FaultEvent.FAULT, abc_faultHandler );









                The screenshot of error is as below:




                                     As you told above I have tried using constructor of StageWebView class with "true" parameter, but it doesn't accept any parameter in it.  Is this works at your end?  Will you please check working of above source code at your end?