PayPal with WooCommerce Integration
WooCommerce, as an eCommerce solution for WordPress, provides basic integration with several payment gateways. Since September 2021, integrating PayPal with WooCommerce requires adding an extension, a third-party plugin.
This additional plugin offers a robust, customizable, and up-to-date solution.
Beforehand, make sure you:
- Have installed the WooCommerce plugin.
- Can log in to your PayPal business account.
Then, follow these steps:
Install Payment Plugins for PayPal WooCommerce
-
From the WordPress dashboard, go to Extensions, click Add, and enter "paypal woocommerce".
- Install "Payment Plugins for PayPal WooCommerce", which supports the new PayPal API. Then click Activate.
-
Back in WooCommerce and this new plugin, click on Settings to access the configurations.
-
Leave the Environment on production unless you have selected the Sandbox mode from PayPal Developers for testing payments. To automatically fill in your PayPal account details, click "Click to Connect" and enter the credentials for your PayPal business account.
-
The API will automatically fill in the information (Client ID, Secret Key, etc.). I recommend not modifying the information and clicking Save Changes.
Configure WooCommerce Advanced Settings
Navigate to Advanced Settings in WooCommerce.
Check and complete the following information:
- Your site's name.
- "Order Prefix" allows you to add a prefix to the order. For example, if your site is "MySite.com," you can add MySite-, and the order number will be added automatically.
- Your site's language.
- "Refund On Cancel" is unchecked by default.
- "Capture Status" allows you to specify when you want to retrieve the funds: only when the order is complete, when it's in progress (Processing), or manually (for subscriptions).
- “Cart Button Location" lets you specify where you want the PayPal payment button, before or after the form.
- "Mini-Cart Button Location" concerns the button in your cart.
- “Validate Checkout Fields" is not recommended; PayPal can retrieve some information automatically.
- "Disable PayPal Shipping Address" is not recommended; it would block the customer from modifying the delivery address. Don't forget to click Save Changes.
Setting up the PayPal Gateway
Now go to PayPal settings.
Check and complete the following information:
- Check "Enabled" to display the PayPal payment.
- The "Title" corresponds to the payment method title; you can leave it as PayPal.
- The description, for example, "Pay directly and easily with your PayPal account."
- "Transaction Type" on Capture to receive funds directly or Authorize if you want to validate the transaction manually.
- "Billing Agreement Description" is simply the description of the PayPal popup.
- "PayPal Payment Sections" for the placement of the PayPal button, by default on the cart page and the order pay page.
- "Payment Method Format" to display the customer's email address on the interface or not.
- "Checkout page Button Placement": here, I recommend selecting "In payment gateway section" to integrate the button into the order section.
- "Use Place Order Button" is unchecked by default.
- "PayPal Button Design": The following settings correspond to the graphical appearance of your PayPal button.
- "Pay Later" can be checked if you accept that the customer accesses a resource without paying immediately.
- "Card Enabled": I recommend enabling it to offer the option of payment by credit card, always through PayPal. You can modify it if you want to change the design of this button and its placement. Click Save Changes when done.
"Pay Later Messaging" allows you to modify the settings of this option if checked in the previous section.
Verify The Checkout Process With PayPal
Go back to Payments, make sure the PayPal method is enabled.
You can now refresh the order page and verify that PayPal is displaying correctly.
If you already have generated credentials (Client ID and Secret Key) from PayPal Developers, before following the previous steps, you will have two Apps on your account. Feel free to delete the one that is not being used, indicated as "WooCommerce" in the image below:
Feel free to use the sandbox mode to test your payment process. Check out this PayPal sandbox testing guide if you want to learn more.
The Payment Plugins for PayPal with WooCommerce facilitates the integration, and once your store is linked to your PayPal account, you are ready to receive payments from your customers with ease.