9 Replies Latest reply on Jul 20, 2011 7:19 AM by rohanlon

    I have a REAL problem that I need help with

    rohanlon

      many thanks to kglad for all his help last week with a problem but it hasn't fully sorted it out. I have a site with 908 buttons. Basically a person clicks a button, makes a donation (through paypal) and then that button gets their name displayed when the mouse hovers over it. Essentially the button becomes the property of the person who makes the donation. The problem I need help with is how to disable each button when someone clicks it. Disabling a button isn't the problem. I need it disabled only when the person has made a valid donation. Each button has a unique instance name (b001 - b908). There must be a way.

      Many thanks in advance.

        • 1. Re: I have a REAL problem that I need help with
          kglad Adobe Community Professional & MVP

          paypal can send data back indicating payment has been made.  you need to use that to disable the button.

          1 person found this helpful
          • 2. Re: I have a REAL problem that I need help with
            rohanlon Level 1

            I can't get this to work at all. At this stage, I'm considering a complete restructure of the site in dreamweaver.

            I would love to be able to complete it in actionscript though as I would be learning something new.

             

            When a user clicks a button, and goes through the paypal process, I need the clicked button to be disabled.

             

            It has to be such that it gets disabled only when a user has made a donation through paypal. For example, plenty

            of people may just click on the buttons as they are checking the site out, without any intention of using the paypal

            facility. This is just human nature. Obviously, I don' t want any buttons disabled under these circumstances.

             

            I was thinking, do I need a statement such as .......... "on returning from paypal, disable the clicked button"

             

            Or is it just a case of......... "on returning from paypal, remove the event handler"

             

            Or is it something completely different, I require, (please don't say a brain would be helpful).

             

            Is there some generic code out there that could help me out please.

            • 3. Re: I have a REAL problem that I need help with
              kglad Adobe Community Professional & MVP

              there's no generic code.  you need to use something returned from paypal.

               

              this is standard stuff.  no vendor could use paypal unless they received notification from paypal that payment has been completed so the vendor can direct the user to the appropriate page on their site.  it's not much different with flash.

               

              i've done this several times in the past (and it seems to me that paypal has changed their api more than once over the past few years that i've been developing applications) and i know it can be done with ipn (instant payment notification).

              • 4. Re: I have a REAL problem that I need help with
                rohanlon Level 1

                Hi kglad, and yet again many thanks for your help.

                 

                Basically I don't know how my website will determine (in actionscript terms)

                how the return from paypal has occurred. How will it know that it is a

                return from PPal so that I can create an if statement (I was thinking

                something along the lines of : if paypal returns to site, perform a disable function). I don't even know if this is the way to do it. I can't even seem to find the way Paypal performs an "Autoreturn" to the site, it says one

                way but when I look to do it, I can't.

                 

                I know it's only standard stuff, but I am only trying to teach myself AS3.

                I am not finding it easy and from time to time I certainly require invaluable help from good guys like yourself.

                Best regards,

                Ray

                • 5. Re: I have a REAL problem that I need help with
                  rohanlon Level 1

                  OK....Since I was last on, I have been able to redirect paypal to

                  my website. Now all I need is some way (in AS3) for the code to recognise

                  the return from PPAL and then I can invoke a function to disable the clicked button.

                  • 6. Re: I have a REAL problem that I need help with
                    kglad Adobe Community Professional & MVP

                    what's being returned from paypal and how's it being returned?

                    • 7. Re: I have a REAL problem that I need help with
                      rohanlon Level 1

                      Hi kglad.

                      Please find two screengrabs. One is the code I set up for my buttons.

                      (3 types based on 3 different prices). The other is a view of the options in

                      Paypal that enable me to tell PPal to return to my webpage. I don't see

                      anywhere that I can put in a disable button option.

                      Ray

                      code.JPGppalsettings.jpg

                      • 8. Re: I have a REAL problem that I need help with
                        kglad Adobe Community Professional & MVP

                        direct the user to a url that opens another embedded swf saying congratulations blah blah blah and use localconnection to communicate between your main app (where you can disable your buttons) and the one that indicates payment was made.

                        • 9. Re: I have a REAL problem that I need help with
                          rohanlon Level 1

                          direct the user to a url that opens another embedded swf saying

                          congratulations blah blah blah and use localconnection to communicate

                          between your main app (where you can disable your buttons) and the one

                          that indicates payment was made..........

                           

                          I don't understand large parts of that. Is there no actual way to do what I want with

                          the code structure that I already have in place. I don't know what you mean when

                          you say "local connection"

                           

                          I was thinking.....can I not tell AS3 to disable the button when it identifies the

                          unique URL ID no......or will that disable all the buttons regardless, whether the

                          paypal transaction took place or not.

                           

                          I apologise for trying your patience kglad but I genuinely don't understand your last

                          reply. I feel that I'm only one last step away from where I want to be. I appreciate that

                          you have spoonfed me practically all the way but I am only learning.

                           

                          Hopefully in a few months (years) from now, I can return your generosity by helping

                          someone else out.