I took a quick look at this module (and sub modules). It appears to me the user is expected to enable one of the sub modules for donation, subscription and paid ads specifically.
I just need to make simple payment via paypal. I allow user to register for a training class or pay for a book. I don't care about tracking the orders using the module.
Here is my understanding: if still want to use the base module, I basically need to create a function lm_paypal_pay() like lm_paypal_donate(). My function will just bring up the paypal page and process the payment. There may be some IPN tracking afterward.
I have two questions: 1. Am I on the right track? 2. Can (should) this be a module? (it may be just an additional function in the base module)
If I am on the right track, I can start to work on this feature and contribute it back when I get it working. If it's a module, I anticipate it to be nearly identical as the donation module.
thanks!
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | simplepay.zip | 6.66 KB | newbuntu |
Comments
Comment #1
newbuntu commentedI dug deeper into the donation sub module. I appears to me other than a few hard coded strings, this module can be used for generic simple fee payment.
I just renamed relevant "donations" to "simplepay", and changed the default $button_url. (The original design allows caller to override this parameter anyway). I did some quick clicks, it appeared to be working so far. If I find further problems I'll report back here.
I have attached the renamed ("plagiarized" ;) module here. I wonder this "new" module should replace the donation module; then donation would be just a special use case, like in the following example?
The only difference between this example and the original document is the extra button URL. If you leave the URL out (like the original example), then you'll see generic paypal button (or you can supply your own button image).
Comment #2
Patroclas commentedMaybe I have misunderstood what you are trying to achieve but how does this differ from a button generated by PayPal (https://www.paypal.com/cgi-bin/webscr?cmd=_button-designer) for example?
Comment #3
newbuntu commentedI apologize if my previous post sounded misleading. The key is not about the button. I believe the "donation" module should be renamed as a generic paypal payment module.
Nothing is really changed in the "new" module (other than a few variable and function names). Technically, you don't even need to rename the module and still use it for generic payment processing (such as paying for a book, or an online training course). A generic name (like "simplepay") may sound more proper. Otherwise, it may seem a bit odd to use the donation module for generic purchase.
Comment #4
lyricnz commentedReworking this module probably falls into the redesign raised at http://drupal.org/node/328730
Comment #5
newbuntu commentedI am still wondering about this. I understand you have another thread open for re-design discussion.
I'm thinking may be there is a long term re-design and a short-term continued development. So far, renaming donation module to a simple (one item) payment has worked for me. I only changed the verbiage, replaced "donation" everywhere in the "new" module. I am wondering if this small change should be made by now? (while everyone is waiting for the long-term final re-work).
2 cents.
Comment #6
john franklin commentedSounds like some refactoring is in order. We will look at it for the 2.x release.