2 Replies Latest reply on Apr 3, 2009 2:20 AM by nikos101

    Paypal button in flex

    nikos101 Level 2
      You know how you get that code from paypal for a button; lets say a donate button. How would you include the same button and functionality in a flex program?
        • 1. Paypal button in flex
          Cesare Rocchi
          Here is a quick example.
          Change parameters as you like.

          private function donate():void {

          var url:String = "https://www.paypal.com/cgi-bin/webscr";
          var request:URLRequest = new URLRequest(url);
          var variables:URLVariables = new URLVariables();

          variables.cmd = "_donations";
          variables.business = "YOUR PAYPAL EMAIL";
          variables.item_name = "YOUR APP NAME";
          variables.no_shipping = "0";
          variables.no_note = "1";
          variables.tax = "0";

          variables.currency_code = "EUR USD OR ...";
          variables.tax = "0";
          variables.lc = "US UK IT ...";
          variables.bn = "PP-DonationsBF";

          request.data = variables;
          request.method = URLRequestMethod.POST;
          navigateToURL(request);
          }

          <mx:Button label="Donate" click="donate()"/>
          • 2. Re: Paypal button in flex
            nikos101 Level 2
            Many thanks, for that