How the plugin works
For every completed order, the receivers that you’ve previously set will get a percent commission calculated on the order subtotal amount.
Let’s consider, for example, an order worth €100, with 2 eligible receivers, one has a 50% commission rate, the other one has a 20% commission rate.
As soon as the order goes to Completed status, two payments will be issued from the admin PayPal account, the first one is worth €50 and the second one is worth €20.
But let’s see how to configure all the API settings in the right way.
In order to works properly, opcache.save_comments must be set at 1 in php.ini file of your server
To start using your PayPal account to pay percent commissions to your partners, you will have to create a Payouts app.
Once you are in your PayPal account, make sure you create a REST API app or use one you’ve already created.
Here, you will find your Client ID and Secret KEY in your REST API app.
These are the keys that you have to add in the plugin settings. So, go to YITH > PayPal Payouts > Payouts API settings:
PayPal business email: enter your business PayPal email to use the payouts service. You can find it inside your Payouts applications settings in developer.paypal.com.
Application Client ID: enter here the key you find under Client ID
Application Client KEY: enter here the key you find under Secret
Let’s see now the other options in this section:
Enable Sandbox Mode: enable this option if you want to test this plugin with a sandbox PayPal account first, so no real transaction will be made. If you want to create a sandbox account, please, refer to PayPal official documentation.
IMPORTANT: By default, Payouts is enabled in the sandbox environment. Merchants in the U.S. with a business account can enable Payouts in the live environment. Please, refer to PayPal official documentation for more information.
Enable Log: enable this option if you want to see the error log during debugging. Remember to disable it when your website is regularly running.
Webhook Configuration: here you find the URL that you have to enter in your PayPal account setting in order to make the payments be issued correctly. To set it up, click on Add Webhook in your PayPal account and paste the URL into the Webhook URL there:
Then, select all PayOuts events as shown in the following image:
In the Live App settings, check if Payouts is checked like this:
And then in My Account check that your account is a business account , and then the Payouts item has the “green check”.
If it displays the “enable” text, just click on the link and send a message to PayPal to get it enabled:
Once completed, press Save and you’re done.