PayPal

Note

This section references PayPal's standard payment product, not PayPal's PayFlow Pro.

ActionKit's PayPal implementation offers support for paying via PayPal accounts.  Users set up their PayPal accounts to use whatever payment method they prefer (e.g. credit card, bank account). When users pay via PayPal accounts they are redirected to the PayPal site and then back to ActionKit after they approve the payment.

Enabling PayPal On A Donation Page

When you create a Donation Page, on the Action Basics screen, you'll see an option to select a PayPal account in addition to the primary payment account used to handle credit-card entries.  These are setup in our system in the same way as your other payment accounts. If you haven't provided the appropriate credentials there won't be any account to select for PayPal.

To setup your PayPal account in ActionKit, we need:

  • a client ID and client secret for the PayPal REST API (live, not sandbox)

When you have the appropriate API credentials just send them to ActionKit support via a support ticket and tell us what you'd like us to call the account.

Once you select a PayPal account, the Paypal option will be displayed on your page, if you're using the latest template design. If you don't see a PayPal option, you probably need to modify your templateset.

To setup your donation template to process PayPal donations via ActionKit your developer needs to add a new form variable called "paypal" which is set to "1" when the user is asking to use their paypal account.  The Original templateset does this with a radio button:

<input type="radio" name="paypal" value="1" id="pay_by_paypal">

You can also use a hidden field:

<input type="hidden" name="paypal" value="0">

This would work well if you want to have a PayPal button instead of a radio button - your button could use Javascript to set the "paypal" hidden field to 1.

In either case the form still submits to ActionKit.  Our integration won't work if you put a standard PayPal button on your page.  That will send the donation directly to PayPal and ActionKit won't know what happened.

Form Behavior And Data Capture

Paying via PayPal account is different from the other payment methods in ActionKit in that it does not, by default, require any user data to initiate a donation - only the amount must be selected.

You are able to require more data to be collected using the "PayPal User Requirements" drop-down when setting up the donation page - you may select "Require email" or "Require name, email and address." Not requiring any user data is still the default and the following description assumes you've left "PayPal User Requirements" set to "No user data required."

There are three use-cases supported by ActionKit when the user pays via PayPal account:

1 If the user enters their email address on your donation form then that email address will be used in our order system, regardless of what PayPal account the user pays with at PayPal.

2 If the user comes to your site from a mailing link with an AKID, but does not enter an email address on the donation form, the user account associated with the AKID is used for the order.  (In many cases your members will have separate PayPal addresses that they do not want subscribed to your list.)

3 If the user comes to donate without an AKID and they do not enter an email they will be given a temporary email address in our system when they initiate the order (ak-paypal-XXXXX@example.com).  When they complete the order the email address of the PayPal account they used will be used to create a new user in ActionKit (if one does not exist) and the order will be transferred to that account.  The temporary account is then deleted.

In all cases a set of custom action fields records the account used to complete the order at PayPal - ak_paypal_first_name, ak_paypal_last_name, ak_paypal_address_line1, etc.  A shipping address entry is also created from the shipping address on their PayPal account - this data is stored in core_order_shipping_address.

Also, note that duplicate donation protection is not active for PayPal account donations.  We're not requiring any user data so it's not currently possible to check before they've donated if the donation is a duplicate.

Recurring Payments

Users can create recurring donations using their PayPal account. Users and administrators can cancel a PayPal recurring donation (which they call a subscription) through ActionKit as they can for recurring donations through other merchant vendors. However, PayPal does not allow changes to recurring commitments. To make a change the user must cancel and resubmit.

Additional changes to your templates are required to properly display recurring donations made with PayPal accounts. In recurring_info.html, a new conditional is needed:

{% if profile.order.payment_method == "cc" %}
It's currently using a credit card ending in {{ profile.card_num }} with an expiration date of {{ profile.display_expiration_date }}.
{% endif %}

And user_view.html needs changes to not offer to update the recurring order:

{% if profile.is_active %}
  {% if profile.order.payment_method != "paypal" %}
    <a href="/cms/pledge/update/update/">Update your credit card</a> or <a href="/cms/pledge/cancel/monthly/">cancel at any time.</a>
  {% else %}
    <a href="/cms/pledge/cancel/monthly/">Cancel at any time.</a>
  {% endif %}
{% else %}
  <b>{{ profile.get_status_display }} on {{ profile.updated_at|date:"m/d/Y" }} </b>
{% endif %}

You can see these changes in the Original templateset's recurring_info.html and user_view.html.