I am actually unsure about the reason why it is closed — in any case, I do not understand how the "being a question about developing a web application" applies here: the forum is about web apps, so every question always relates to developing a web application; I emphasize that I am asking about one specific detail about the web application (connecting the paypal button to my setup), as opposed to just giving a set of specifications on what I need and expecting the forum to develop a system for me.
Perhaps it was not very clear that the actual question was: Could someone point me to some examples of the concrete code that one has to generate for the thing to work?. Seems to me like a very concrete question with very concrete answers (even if many possible of them). Maybe part of the problem is that I added that at the bottom, after all the details, making it sound like those details are just specifications so that people can design a system for me?
In my mind, I'm asking a specific question, but the sort of "chicken or the egg" problem I'm having is that I cannot come up with a web app that I wrote that is missing some pieces to ask about those pieces because I don't even understand the scheme as Paypal explains it; so, it is kind of I need to first see an answer (see the pieces in action to then adapt it to my application) to be able to formulate the question in the very specific format of "here's the system, this detail is not working, can someone see why?".
Perhaps an alternative to turn it into a valid question could be to rephrase the "the way it work is...." and phrase it as "this is what we have", so that it doesn't sound like those are part of specifications that need to be used to develop a complete web application?
I will highly appreciate any additional comments to help me understand why this question is not welcome in this forum, and I hope I will be able to rephrase it to turn it into a valid/accepted question.
Original question:
I've been trying to add a Paypal payment button to our site. I find Paypal's documentation extremely poor and useless (I admit that I have very little experience with any modern web development techniques, so that may be part of why I can't understand their documentation).
From our perspective, the way it works is:
- We sell a yearly subscription for a service
- Our database has a UserID (an integer value) for each user
- Our users log in and then go to a section "Subscribe", where we allow them to select 1, 2, or 3-year subscription
- From there, we would want the user to go to the Paypal payment form.
What I picture in terms of processing (on our side) could be something like:
- Once the user completes all the steps, we could create an entry in one of our tables (say, customer_payment) where we put a unique paymentID value and all the related information — UserID and number of years they want to pay for).
- When Paypal tells us (I suppose via a callback in the JavaScript code?) that the payment was successfully completed, we need to be able to associate that callback to the paymentID that is related to that action, and the rest is entirely on our side.
Could someone point me to some examples of the concrete code that one has to generate for the thing to work? Paypal examples show little bits and pieces, but I am clueless about (1) how to connect and how those pieces work together; and (2) they are particularly unclear on what is supposed to be there literally as the example shows, and what is supposed to refer to some data that one fills in.
BTW, we already have a Paypal account (for now, we've been using the Paypal invoices as a temporary mechanism for the payments).