Code

Super Forms - PayPal Add-on

Super Forms - PayPal Add-on

Free Live Demo: Click here to try out this add-on for Super Forms!
Setup Guide: How it works and how to set it up

Plugin description

With this Add-on for Super Forms you can create forms where users will be redirected to the PayPal’s checkout page. From “subscriptions with trial period checkouts” to “simple one product checkouts” it’s all possible with this add-on for Super Forms.

This add-on is also compatible with both:
Super Forms – Front-end Register & Login
Super Forms – Front-end Posting
You will be able to charge users for registering and posting content

Because of it’s seamless integration with Super Forms your contact entries status will be updated after PayPal IPN has notified your website about a successfull payment. Along with this a new Transaction will be created so a record of payments will be kept within your WordPress back-end. Within the back-end you can also track current active/suspended/canceled subscriptions

Transactions listing:

Subscriptions listing:

Settings / Options:

Settings:

For all settings you can use {tags} to make your checkout even more dynamic

GENERAL SETTINGS:

  • Enable PayPal Sandbox mode (for testing purposes only)
  • PayPal merchant email (to receive payments)
    – Your PayPal ID or an email address associated with your PayPal account. Email addresses must be confirmed.
  • PayPal currency code
  • Select whether or not to prompt buyers for a shipping address.
    • Prompt for an address, but do not require one.
    • Do not prompt for an address.
    • Prompt for an address and require one.
  • PayPal payment method
    • Single product or service checkout
    • Donation checkout
    • Subscription checkout
    • Cart checkout (for multiple product checkout)
  • Enable custom return URL
  • PayPal return URL (when user successfully returns from paypal)
    – The URL to which PayPal posts information about the payment, in the form of Instant Payment Notification messages.
  • PayPal cancel URL (when payment is canceled by user)
    – User that cancels payment will be redirected to this URL

PRODUCT & DONATION CHECKOUT SETTINGS:

  • Item description (leave blank to let users enter a name)
    – Description of item. If you omit this variable, buyers enter their own name during checkout.
  • Item price (leave blank to let user enter their own price)
    – The price or amount of the product, service, or contribution, not including shipping, handling, or tax. If you omit this variable from Buy Now or Donate buttons, buyers enter their own amount at the time of payment.

SINGLE PRODUCT CHECKOUT SETTINGS:

  • Quantity (Number of items)
    – Note: The value for quantity must be a positive integer. Null, zero, or negative numbers are not allowed.
  • Weight of item (leave blank for none)
    – If profile-based shipping rates are configured with a basis of weight, the sum of weight values is used to calculate the shipping charges for the payment. A valid value is a decimal number with two significant digits to the right of the decimal point.
  • Item number (to track product or service)
    – Pass-through variable for you to track product or service purchased or the contribution made. The value you specify is passed back to you upon payment completion.
  • Discount amount (leave blank for no discount)
    – Discount amount associated with an item, which must be less than the selling price of the item.
  • Discount rate (leave blank for no discount)
    – Discount rate, as a percentage, associated with an item. Set to a value less than 100
  • Discount number
    – Number of additional quantities of the item to which the discount applies.
  • Shipping cost (applies to first item added to cart)
    – The cost of shipping this item.
  • Shipping cost 2 (applies to each additional item added to cart)
    – The cost of shipping each additional unit of this item.

SUBSCRIPTION CHECKOUT SETTINGS:

  • Subscription periods
    – Here you can setup the subscription price, time and periods

Put each period on a new line, seperate values by pipes, for example:
7 day trial for free: 0|7|D
After trial 3 weeks for 5 dollar: 5|3|W
After that $49.99 for each year: 49.99|1|Y
Time format options: D=days, W=weeks, M=months, Y=years

CART CHECKOUT SETTINGS:

  • Items to be added to cart
    – Here you can enter the items that need to be added to the cart after form submission
    You are allowed to use {tags}
    Put each item on a new line, seperate values by pipes
    Leave options blank that you do not wish to use, for example:

    To add 5 times a 3.49 dollar product write it like below:
    3.49|5|Flowers
    Below you can see a full example with {tags}:
    {price}|{quantity}|{item_name}|{tax}|{shipping}|{shipping2}|{discount_amount}|{discount_rate}
    For more information about each option read the PayPal\’s Variable Reference
  • Cart tax
    – Cart-wide tax, overriding any individual item tax value
  • Cart weight
    – This value overrides the weight values of individual items. If profile-based shipping rates are configured with a basis of weight, PayPal uses this value to calculate the shipping charges for the payment.
  • Cart discount amount
    – Single discount amount charged cart-wide. It must be less than the selling price of all items combined in the cart.
  • Cart discount rate
    – Single Discount rate, as a percentage, to be charged cart-wide. Set to a value less than 100. The variable overrides any individual item discount rate
  • Cart handling fee
    – Single handling fee charged cart-wide.

ADVANCED SETTINGS:

  • Language for the billing information/log-in page
    – Sets the language for the billing information/log-in page only. Default is US.
  • Character set and character encoding for the billing information/log-in page
    – Sets the character set and character encoding for the billing information/log-in page on the PayPal website. In addition, this variable sets the same values for information that you send to PayPal in your HTML button code. Default is based on the language encoding settings in your account profile.
  • Handling charges
    – This variable is not quantity-specific. The same handling cost applies, regardless of the number of items on the order.
  • Allow buyers to specify the quantity
  • Select weight unit
    – The unit of measure if weight is specified.
  • Invoice number
    – Use to identify your invoice number for this purchase.
  • The area code for U.S. phone numbers, or the country code for phone numbers outside the U.S.
    – PayPal fills in the buyer’s home phone number automatically.
  • The three-digit prefix for U.S. phone numbers, or the entire phone number for phone numbers outside the U.S., excluding country code
    – PayPal fills in the buyer’s home phone number automatically.
  • The four-digit phone number for U.S. phone numbers
    – PayPal fills in the buyer’s home phone number automatically.
  • PayPal notify URL (only for developers!)
    – Used for IPN (Instant payment notifications) when payment is confirmed by paypal
  • Entry status after payment completed

ADDRESS PAYPAL SETTINGS:

  • Parse address to paypal based on form input data
    – Parse the entered address information to paypal. This will not override the PayPal member’s default address unless you enable the ‘Override’ option below.
  • Override the PayPal member’s stored address
    – The address specified with automatic fill-in variables overrides the PayPal member’s stored address. Buyers see the addresses that you pass in, but they cannot edit them. PayPal does not show addresses if they are invalid or omitted
  • First name
  • Last name
  • Email address
  • Street (1 of 2 fields)
  • Street (2 of 2 fields)
  • City
  • U.S. state
  • Postal code
  • Shipping and billing country

ADD-ON SETTINGS:

  • Front-end Posting Add-on: Post status after payment complete – Only used for Front-end posting (publish, future, draft, pending, private, trash, auto-draft)
  • Front-end Register & Login Add-on: Registered user login status after payment complete – Only used for Register & Login add-on (active, pending, blocked)

Compatibility

Super Forms v3.5+

Changelog

Mar 13, 2018 - Version 1.0.3
- Fix: Bug with Cart Checkout in combination with dynamic column and with at least one static value in "Items to be added to cart" 

Feb 15, 2018 - Version 1.0.2
- Fix: Allow settings to be empty for new Super Forms versions (values that can be left empty must not be overwritten by default value)

Jan 19, 2018 - Version 1.0.1
- Fix: When a user was created with Register & Login add-on, and later deleted PHP would throw error on txn page under "Created User".

Nov 30, 2017 - Version 1.0.0
- Initial release!
by
by
by
by
by
by