Mike - To answer your question, "if they go to their PayPal account and cancel their subscription, will PayPal notify my site through the IPN behind the scenes"... The answer is yes. PayPal from the very start of the payment transaction will always notify (as long as the Page URL of the site doesn't change and the page is always available to 'all users') PayPal will talk back to that form and pass along the PayPal IPN code. I actually think to process a cancellation the user must do this on the PayPal side. Depending on the IPN status code, you can process the completion events.
For more detailed implementations, you might consider using Dynamic SQL Events instead of the role completion event. This will give you more control over adding/removing user to and from roles and better yet, adding 'days' to their security role based on their subscription terms. So if the subscription is 30 days, 90 days, a year etc... You can handle this with role events but I think you would have more power using a SQL event to control the effective and expiry date.
Basically, PayPal will always talk to your registration form and should process the events accordingly. So, if a user pays with a 'Check', it will sit in pending for a few days on PayPal and you might not want to add the user to a role or fire off a specific email (or maybe fire off a pending email), and then a few days later when it goes to completed you would want to handle these requirements then etc...
Here is another thread which is also a very detailed description of using Dynamic Forms w/ PayPal (non subscription in this example) that should also provide some tips. We are also working on some tutorials and demonstrations that you will be able to directly export / import into your site and there are a few example of working implementations on beta springs as well.
Here are a few major tips:
* Setup a PayPal Sandbox account... Yes this is a learning curve... but there is no better way to test your exact scenerio(s). I know we all want this to be a 5 minute setup within your module but the bottom line is you are dealing with several business processe(s) that need function exactly as you want them to, and this involves PayPal talking back and forth to your site on a consistent basis to make sure a users payments match up with emails that go out, security roles being added or change, securied roles being removed etc...
* Add &Debug=True or ?Debug=True to your querystring when loading the page. This will also allow you to see the exact information that is being passed to PayPal and can help in debugging why something might or might not b e working. For example: http://www.yoursite.com/TabID/55/default.aspx?Debug=True (you must be signed in as admin to use this feature).
* Review all tutorials, other forum threads (there are several now), and demonstrations that we will be posting soon.
* Make sure your page is viewable to all users. Often during development you will want to only have a page visible to Administrators, however the PayPal IPN system cannot talk to the registration form at that time. You need to make the page viewable to all unauthenticated users so that PayPal can talk to it.
* I am still reviewing the parameters that need to be passed to cancel a subscription directly, however for a user to cancel a subscription themselves they need to:
- Log into PayPal (www.paypal.com)
- Click "History" within the menu
- Select "Subscriptions" from the "Show:" combo box (you might also select a longer timeframe from drop-down box if you have had your account longer than a month.)
- Click submit.
- You should see an entry called "Subscription Creation" There will be a link in the "Status" column that tells you the status of the subscription. If it says "Active", click it.
- Click the button that says "Cancel Subscription" and follow the remainder of the steps.
So... Hopefully this helps and let me know if you have any questions.
-Chad
|