Table of Contents
The Braintree gateway built into Restrict Content Pro allows you to use your Braintree account to accept credit cards directly on your website.
If you don't already have a Braintree account, go to https://www.braintreepayments.com and create an account.
After creating an account, follow the steps here to get started:
2. Enter both your public and private keys into the Restrict Content Pro payment settings tab under Restrict > Settings > Payments.
3. Enter your Merchant ID: https://articles.braintreepayments.com/control-panel/important-gateway-credentials#merchant-account-id
4. Enter your Client-Side Encryption (CSE) key: https://articles.braintreepayments.com/control-panel/important-gateway-credentials#client-side-encryption-(cse)-key)
5. We recommend enabling CVV support in Settings > Professing > Fraud Tools > CVV.
After entering the above information, you can start testing Restrict Content Pro with Braintree when you enable the "Use Braintree sandbox to test your transactions" option.
Note: It can take a few business days for Braintree to set up a merchant account for you.
Set up your subscription plan(s) in Braintree
Braintree requires that all recurring subscription plans be manually entered in your Braintree merchant interface. These plans contain the same pricing and duration details as your Restrict Content Pro membership levels.
First, create your membership level(s) inside Restrict Content Pro, then login to your Braintree account and click "Plans" under "Recurring Billing" on the left.
Click the "New" button to create a new plan. You'll see a form that looks like this:
All the information you enter here needs to match what you've entered in your RCP membership level, including the "Plan ID". You can find your membership level ID in RCP by going to Restrict > Membership Levels and hover over the membership level. You'll see the ID number appear, like so:
In this case, I would enter "7" in the "Plan ID" box in Braintree.
Your Plan Name, Price, and Billing Cycle should also match. If you've included a free trial with your membership level, that needs to be configured as well by checking the "Include Trial Period" box and filling out the additional information.
If you change any of this information in RCP at a later date, it also needs to be adjusted in your Braintree account.
With Braintree, customers will be shown a credit / debit card form directly on your registration form:
After filling in the credit / debit card details, the customer will be presented with a processing indicator. If the card is successfully charged, the customer will be redirected to the success page. If the card fails, the customer will be shown an error message.
Webhooks are how Restrict Content Pro communicates with Braintree and is the system RCP uses to detect when a subscription has been updated (payment made, account cancelled, etc.).
The URL that Braintree sends webhooks to must be configured manually from your Braintree Webhooks page ( Settings > Webhooks ).
Click the "Create new webhook" button to be taken to the webhook form. In the "Destination URL" field, enter your store's main web address with
/index.php?listener=braintree at the end. For example:
https://example.com/index.php?listener=braintree (be sure to change example.com to your own site's domain name).
Then select all notifications under the "Subscription" category, as shown below.
If you are using Braintree in sandbox mode you must also configure a webhook in your Braintree sandbox account.
3D secure 2.0
Restrict Content Pro's Braintree gateway supports 3D secure 2.0 as long as you're on RCP version 3.3 or higher. In order to utilize 3D secure, it needs to be enabled in your Braintree account. It’s automatically enabled for sandbox accounts, but you will need to contact Braintree to have it enabled in your live account.
Once enabled, some customers may see a 3D secure prompt like this while their card is being processed:
Testing Braintree payment gateway
To test Restrict Content Pro with Braintree, follow these steps:
- If you haven't already, signup for a sandbox account here: https://www.braintreepayments.com/sandbox
- Enter your test merchant, public, and private keys in Restrict Content Pro > Payments. Also enter your Sandbox Client Side Encryption Key.
- Enable sandbox mode in Restrict Content Pro > Payments.
- Visit your website's registration page while logged out.
- Enter the user information. This can be anything, though a real email address that you have access to is advised.
- Choose a paid membership level.
- Choose to auto renew (or not) the subscription.
- Choose "Credit Card" as the payment method.
- Enter "4111111111111111" for card number. (Other test card numbers are available here.)
- Enter 12 / 2020 for the expiration. Any date in the future will work.
- Click "Register".
- You should now be redirect to the success page and logged-in as your new user.
- Check your Braintree transaction list, you will see the test transaction. If making a recurring payment, you should also see the subscription in your Braintree subscriptions list.
- Your new user now has a fully activated account.