I suppose these two achieve similar things, so your handler will be called when IPN comes in. If anyone sees otherwise please share your thoughts here.

I plan to proceed hook_lm_paypal_web_accept_register for now.

Comments

lyricnz’s picture

lm_paypal_web_accept_register() is not a hook, but an internal function that's used to register a function to receive events when particular item-numbers arrive. It happens to be used by the donation module.

lm_paypal_web_accept_invoke() is not a hook either, but a function that happens to be called for certain kinds of incoming IPNs from paypal.

newbuntu’s picture

my bad. The post title was right. I mis-quoted inside the content.

I meant hook_lm_paypal_process_in(). That's the one I'm using, it appears to be working.

lyricnz’s picture

What is this issue actually asking?

newbuntu’s picture

sorry for the confusion. I was initially asking the difference between hook_lm_paypal_process_in() and lm_paypal_web_accept_register().

I think hook_lm_paypal_process_in() is the right way to hook into my own callback. Although, I believe lm_paypal_web_accept_register can also used to register a specific callback for "web_accept" handling.

lyricnz’s picture

This is all related to a "redesign" that I want to do, for D6 or newer. At the moment there is too much coupling between the base module, and it's sub-modules (donation, subscription, paid adverts), which should be decoupled a bit, making it easier to reuse the core, without all the assumptions that come with the current use cases. An example being "donations" vs "one-time payment", and the kindof counter-intuitive way that paid adverts currently relate to subscriptions.

We seem to have a lot of people asking for new features, but nobody contributing ideas for doing this in a reasonable way (which is not to say that the current code is great - but it's reasonably stable/mature, which is something).

john franklin’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev