This is a demonstration of Dynamic Forms integrated with PayPal to set up two different subscription types. It illustrates Dynamic Forms' advanced functionality to handle subscriptions with varying amounts, billing cycles and recurring payments. In addition, a variety of completion events such as adding roles and sending emails are linked to PayPal notices.
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 2 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.
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:
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).
Parameters are the way we pass transaction details to PayPal using a variety of tokens. We encourage you to review the description of various PayPal variables (also referred to as tokens). There are more variables to consider in a subscription type of transaction. Here's a general description of the variables used in this demo:
The a3 is the amount that will be charged for the subscription. The variable t3 defines the billing cycle unit while p3 is the regular billing cycle. The variable src=1 means that payment will recur unless the customer cancels the subscription. You may also use sra=1 if you PayPal to try again after payment fails.
Because we will need a different set of parameters for each type of subscription here, we are using the option value of each type to define the item name, a3, t3, and p3 as shown in these images:
Notice how the Update Option Value for each type is set with the required PayPal variables. The Monthly amount is 10.00 and the t3 is M (for Monthly). In contrast, the Annual Subscription amount is set to 100.00 the t3 is Y (Yearly).
The Additional Parameters box for this demonstration should look like this in Module Configuration, PayPal Gateway.
You may view Demonstration # 17 to see how the parameters look like if there's only one paid subscription type.
Please note that the current settings for this demo is different from the above illustration. The amount is defaulted to $.01 and the src and sra variables were removed. This is done to ensure that charges are limited to $.01 in case you choose to test a complete transaction using your live PayPal account.
Remember: Except for the ItemName, absolutely no spaces are allowed within the parameters. Even one space will cause your PayPal link to error out.
Eight completion events were created for this demo. After a completion event is created, it needs to be ‘tied’ to a PayPal IPN in the PayPal Gateway section under Module Configuration. By doing this, the form knows which event to fire when it receives an IPN from PayPal.
The payment status called 'Redirect Successfully' is tied to the event Success Redirect. This page redirection event will fire when a user clicks on 'Return to Merchant.' from the PayPal page after the transaction. In this example, it is set to go back to this page. You may choose to redirect to a different page that contains a 'Thank you.' message.
Cancel Redirect will fire when a user clicks on 'Cancel' during order processing. In this example, it is set to go back to a specific "Cancel" page to alert users that the order was not completed. This event is tied to 'Redirect after Cancel.’
An email event called ‘Pending Email’ is tied to Pending and is intended to notify customers of their order process should there be any delay. If your customer used an e-check, the process may take several days to complete.
Both Add Role_Monthly and Add Role_Annual events are tied to Completed (Subscription Payment) ensuring that these roles will be added only after payment is completed. The key is to select the appropriate response when creating the event. In the image below, notice how a specific response is required for this particular role event.
In contrast, the role of Demo_Annual will only be added if the user response is Annual as illustrated below:
Another event tied to Completed (Subsciption Payment) is the Welcome email. For this demonstration we used the token $(Type_Text) in the body of the email to eliminate the need to create a unique email for each subscription type.
Your customer may cancel the subscription by going to their PayPal account. For this demonstration, the events called Delete Role_Monthly and Delete Role_Annual are set to fire when the following IPNs are received from PayPal: Completed --Subscription Cancelled, Payment Failed and End of Terms. You may modify this depending on your business specifications. In the image below, you'll find an example of a SQL event to remove roles.
If you choose to download the IPortable file, you may notice that, we are actually using a default role of "Form Demos," instead of the Monthly and Annual roles as shown in the illustration. You can set up your own roles and adjust the role events as you need.
See other Form Demos