Did you know that you can create a PayPal form with Convert Forms? Your users can now get redirected to PayPal after successfully submitting your form, thus giving you the ability to collect donations or sell a product.
How to Create a PayPal Form in Joomla
Start by creating a new Form via Components > Convert Forms > Forms > New or edit an existing one. Once you are in your Form, you will need to add a few fields into your form. Below you can field all fields required for your PayPal form to work.
Decide on your Payment Type
Your Payment can be one of the following:
- Receive donations
- Sell products
If you are receiving donations, you will need to add the following field:
Field Type | Field Name | Field Value |
---|---|---|
Hidden | cmd | _donations |
If you are selling products, you will need to add the following field:
Field Type | Field Name | Field Value |
---|---|---|
Hidden | cmd | _xclick |
After deciding on the Payment Type field, you can now add the fields that say who will receive the payment, the item name that describes what your users will be paying for, the amount of items your user will be buying as well as the amount of the payment, currency and an item image.
Field Type | Field Name | Field Value |
---|---|---|
Number or Textbox | amount | 5 |
Hidden | business | [email protected] |
Hidden | item_name | My Item Name |
Hidden | item_number | 1 |
Hidden | image_url | Image URL of Item |
Hidden | currency_code | USD |
To return your users to a specifc page after they have successfully made a transaction, you will need to add the following field in your form:
Field Type | Field Name | Field Value |
---|---|---|
Hidden | return | URL of a page on your site where users will be redirected once they make a transaction |
Note: You will need to enable Auto Return on your PayPal account page. Read more here: How do I use PayPal's Auto Return feature to redirect customers back to my website?
To return your users to a specifc page after they have cancelled a payment, you will need to add the following field in your form:
Field Type | Field Name | Field Value |
---|---|---|
Hidden | cancel_return | URL of a page on your site where users will be redirected after they have cancelled a payment |
Shipping cost
To set a shipping cost, create the following field in your form:
Field Type | Field Name | Field Value |
---|---|---|
Hidden | shipping | Set your shipping cost |
Lastly, you should set the Form Submission Redirect URL settings to point to PayPal. To do so, go to your Form > Submission and set the following:
Setting Name | Setting Value |
---|---|
Sucessful Submission URL | Redirect URL |
Redirect URL | https://www.paypal.com/cgi-bin/webscr |
Pass Submission Data To Redirect URL | Enable |
How your Form's Submission setting should look like:
After adding the above fields, your form should look something along these lines:
Your users can now set the donation amount, press the Donate button and after successfully submitting the form, they will be redirected to paypal to send the donation.
Donation PayPal Redirection:
Frequently Asked Questions
Can I pre-set the amount of the donation/payment?
You can set your amount field to be a Hidden Field instead of a Textbox or a Number so you can define the amount your donation or payment will have once your users get redirected to PayPal.
Field Type | Field Name | Field Value |
---|---|---|
Hidden | amount | 5 |
Can I calculate the amount based on field values?
Whether you have a simple or a complex calculation, using the Field Calculations you can now pass the calculated total as the amount to your payment or donation.
How can I test my form in PayPal sandbox?
You can test your form in sandbox mode by usng the following Redirect URL, instead of the live PayPal URL mentioned above.
Setting Name | Setting Value |
---|---|
Sucessful Submission URL | Redirect URL |
Redirect URL | https://www.sandbox.paypal.com/cgi-bin/webscr |
Pass Submission Data To Redirect URL | Enable |
How can I set the language when redirected to PayPal?
To set the language of PayPal when redirecting the user to make a payment, you will need to add the following Field in your form:
Field Type | Field Name | Field Value |
---|---|---|
Hidden | lc | GR |
You can find a list of Country Codes, here.