🥳 PayPal support is available with picu Pro version 2.2.0 and later.
In order to enable PayPal as a payment method, you need to provide authentication credentials in the form of a Client ID and Secret, both of which you can find in your PayPal Developer Dashboard.
Sandbox Setup
If you want to run some tests first – and we strongly advise you to do this – you can set picu up with a PayPal Sandbox account. Here’s how:
First you need to add the following constant in your wp-config.php
:
define( 'PICU_PRO_PAYPAL_SANDBOX', true );
Code language: PHP (php)
This makes sure, that picu only ever communicates with PayPal’s sandbox servers.
Then, in your PayPal Developer Dashboard navigate to “Testing Tools > Sandbox Accounts”.
Click on “Create Account” and make sure to select “Business”:

Once the account is created, click on it and then scroll down and click “Create App”.
Give your new app a name, eg. “picu” and confirm with the “Create App” button.

Now you will be able to copy the Client ID and the Secret from the REST API apps table:

Paste those in the respective fields in your picu “E-Commerce” settings:

Please note, that both keys will be encrypted before they are saved to the database.
If you rather want to save the keys in your wp-config.php
file, add the following two constants:
define( 'PICU_PRO_PAYPAL_CLIENT_ID', 'ABCD…' );
define( 'PICU_PRO_PAYPAL_CLIENT_SECRET', 'ZYX…' );
Code language: PHP (php)
If the credentials are working and you have checked the checkbox to enable PayPal as a payment method, your clients will be able to select PayPal as the payment method during checkout:

Production Setup
If you are ready to receive real payments, first make sure to either remove the PICU_PRO_PAYPAL_SANDBOX
constant from your wp-config.php
file or set its value to false
.
To get your “live” credentials, head back to the PayPal Developer Dashboard and navigate to “Apps & Credentials”.
You can then repeat the steps mentioned above to create a new app.
With your app in place, make sure to replace the Client ID and Secret either in your picu settings or your wp-config.php
file – depending on which method you chose earlier.
Making a Test Payment
To make a test payment with PayPal, you need to create another sandbox account, just like described above. This time, choose “Personal” (instead of “Business”) for the account type. It will be used to simulate a client.
When you click on the new account, you can change the email address and the password:

When you get redirected after checkout, use these credentials to log into PayPal and make the payment.