I posted this to the wrong forum initially...
I wanted to be able to convert a course over to Moodle for a small business and they have a subscription AND trial period for their product.
Here's what I did to get most of it to work. In the file:
moodle/enrol/paypal/enrol.html
I added these tags:
Replaced:
<input type="hidden" name="cmd" value="_xclick" />
with:
<input type="hidden" name="cmd" value="_xclick-subscriptions" />
Added the lines below based on the PayPal document: https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_WebsitePaymentsStandard_IntegrationGuide.pdf
The $0.00 trial period doesn't work because if you set a course to $0.00, it doesn't redirect to PayPal (since there is no charge for it). Another chicken and egg problem is that the subscription code, below, worked (redirected me to PayPal) because I set the course to cost $9.99 via the PayPal module in Moodle. However, if I set the trial-period cost to $0.00, the PayPal subscription completes, but the redirect back to Moodle still shows $0.00 was paid so the student doesn't get enrolled into the course. We had to change the model to require a $9.99 payment up front, which they can cancel after 7 days, if they wanted. After the subscription is processed, the PayPal message errors, BUT when they click the button "Return to Course page" from the PayPal window, they get enrolled into the course.
<!-- Trial period -->
<!-- Pay $9.99 (a1) during a 30 (p1) Day (t1) trial period -->
<input type="hidden" name="a1" value="9.99">
<input type="hidden" name="p1" value="30">
<input type="hidden" name="t1" value="D">
<!-- This is a hack because the customer can ask for a refund at the end of the 7 days (we have to advertise that though). -->
<!-- Regular Time period charge $9.99 (a3) each (p3) month (t3) -->
<input type="hidden" name="a3" value="9.99">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="M">
<!-- NOTE: This must be set to a3, p3, t3, etc. -->
<!-- PayPal has an a2, p2, t2, etc. option to allow secondary trial periods (see document link above)
We don't use that so we skip over those settings. -->
<!-- Charge until customer cancels (via their PayPal account) or the PayPal account holder for our business cancels the subscription -->
<input type="hidden" name="src" value="1">
All together without all the extra text:
<!-- Enable subscription -->
<input type="hidden" name="cmd" value="_xclick-subscriptions" />
<!-- Trial period -->
<input type="hidden" name="a1" value="9.99">
<input type="hidden" name="p1" value="30">
<input type="hidden" name="t1" value="D">
<!-- Regular Time period charge -->
<input type="hidden" name="a3" value="9.99">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="M">
<!-- Charge until it is canceled -->
<input type="hidden" name="src" value="1">
Maybe the PayPal module developers could include options for this in the future. Just thought I'd share what worked for me.
NOTE: It doesn't appear the enrol.html file changes on a regular basis, but for each upgrade of Moodle, I have a backup copy of my manual changes so I can add back after the upgrade.