1 person found this helpful
paypal can send data back indicating payment has been made. you need to use that to disable the button.
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.
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).
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.
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.
what's being returned from paypal and how's it being returned?
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.
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.