by
KK » Mon Feb 09, 2015 2:20 pm
Hi,
is there a way to trigger it thru the IPN returning from Paypal?
IPN returned by PayPal needs to be handled by a dedicated script on your site - e.g. the cms:paypal_button (
http://www.couchcms.com/docs/tags-refer ... utton.html) does this using the
cms:paypal_processor tag (
http://www.couchcms.com/docs/tags-refer ... essor.html).
The IPN handler can, of other things, be used to send the email you mentioned.
Since the cms:paypal_processor works only with cms:paypal_button, we cannot use the tag directly but, I think you can use its code as a guide to craft your custom IPN handler.
As an aside, I'm not sure what the the payment plans are for the members of your site but, in case, it is a single payment (as opposed to recurring payments), I think we can piggyback on cms:paypal_button -
Create a single product with pp_price of whatever the membership fee is. The cma:paypal_button will use hook to this.
Then when a member registers, make her use this button to compete the payment (send the member ID as 'custom' field').
In the cms:paypal_processor handling the incoming IPN, activate the member using the ID sent back (and, of course, send the email).
Hope this helps.