Using the EnablePGateway feature, the main focus of this demonstration is the ability to switch the payment gateway on and off to acommodate free and paid subscriptions. It also showcases the ability to handle a free trial period for the paid PayPal subscription. It also features a more customer-friendly CANCEL link capability. In addition, the Advanced Field Wizard is pointed out in the Feature Highlights section.
Background
PayPal is a leading payment processing option that has gained tremendous popularity over the internet marketplace. Dynamic Forms with PayPal Integration allows customers to offer their users more flexibility in the way they pay for their transactions. To find out more about PayPal, please visit http://www.paypal.com.
A term that is often used here is Instant Payment Notification (IPN). This is the definition obtained from PayPal's website:
Instant Payment Notification (IPN) is PayPal's interface for handling real-time purchase confirmation and server-to-server communications. IPN delivers immediate notification and confirmation of PayPal payments you receive and provides status and additional data on pending, cancelled, or failed transactions.
In all demonstrations related to PayPal integration, the focus would be in 3 general areas:
1. The parameters used to pass transaction details to PayPal.
2. The creation of completion events that are tied to different IPN's.
3. Highlights on lesser known features.
You will need to have a PayPal seller account to process payments this way. We recommend obtaining a PayPal Sandbox account while you are in test mode.
Please remember that the page and the form need to be visible to all users in order for PayPal to communicate with it with IPN's.
Setting Payment Gateway to PayPal
1. Go to Module Configuration, Payment Gateway. Set Enable Payment Gateway to Yes and select PayPal as the gateway.

2. Click on PayPal Gateway and observe the following:

Key Pointers:
a. Enter the email you set for your PayPal seller account.
b. Select Subscription as the PayPal Payment Ttype.
c. PayPal URL is either Sandbox.Paypal.com (test) or PayPal.com (production).
Setting Parameters
Before we look at the PayPal parameters for the paid subscription, let's look at how the new feature EnablePGateway is used in this demonstration.

So far, we've seen how to use the EnablePGateway feature to accommodate both free and paid subscriptions in our forms. Now we're ready to look at the parameters for the paid subscription.
Here in Demonstration # 17, there is only one paid subscription and the parameters are all entered individually as you can see in this image:
The free 2 week trial period is handled by the a1, t1, and p1 tokens, Since it’s a free trial, a3 is set to 0; &t1=W refers to a weekly period, while the &p1=2 defines the free trial period to 2 weeks.
The a3 is the regular amount that will be charged for the subscription. The variable t3 defines the billing cycle unit as monthly in this case and &p3=1 says the regular billing cycle is every 1 month. The optional variable src=1 sets the payments to recur until the customer cancels the subscription. Use the optional token, sra=1, if you want PayPal to try again after payment fails.
Remember: Absolutely no spaces are allowed within the parameters. Even one space will cause your PayPal link to error out.
Completion Events
Two sets of key events were created for this demonstration. One set is for the free subscription: the Welcome Free Email, and the Add Role Demo_Free. These events are specific to "Standard -- Free" user response.
The second set is for the paid membership. One of these events is the Welcome Member Email. The other is the Add Role Demo_Monthly. Let's look at how this completion event is set up:

After creating the completion event, we need to link it to a PayPal Payment status as shown below:

The third event related to the paid subscription is the one called "Delete Role_Monthly. Just like in Demonstration #16, this is set up as an SQL event. Notice below how this event is tied to the appropriate IPN within the PayPal Gateway under Module Configuration.

Other events need to be created and linked to PayPal Payment Status such as Redirect Successfully, Redirect Cancel, Pending, Subscription Cancellation and others. Please see Demonstration #15 and 16 to see set up illustrations.
Feature Highlights
One of the most exciting enhancements now available in Dynamic Forms 2.7 is the Advanced Field Wizard. You access this through the Module Menu, Advanced Features and select Advanced Wizard.
Let's say you decided that you want your questions laid out in 2 columns instead of the the current layout of one column. This is all you have to do:

Simply run the wizard and exit -- settings for multiple fields done in one easy step! This is how your new layout will look:

See other Form Demos