For the PayPal payment provider you need to have a business paypal account. For testing you’ll need to setup two sandbox account, one business account and one client account.
Create Sandbox Accounts
Go to https://developer.paypal.com/developer/accounts/ and sign in top right "Log in to Dashboard" (you can use your own personal account for this).
Once signed in Create both a personal and business sandbox account by clicking the “Create account” button.
For each account, in the Manage Accounts column select View/Edit account.
In the dialog, note down the Email-ID and the Password
For the business account, in the View/Edit account dialog, note down the API Credentials also (Username/Password/Signature).
Create a PayPal application
Go to https://developer.paypal.com/developer/applications/ and create an App by clicking the “Create App” button. You’ll need to do this for both your sandbox account, and for the live business account. For the sandbox account, when you create an app, give it a name and pick the sandbox account to associate it with. For the live account, you must login using the live business account credentials.
In the paypal app settings, note down the Client ID + Secret credentials then scroll to the Sandbox Webhooks section and setup a webhook. The URL should follow the format:
{YOUR_DOMAIN}/umbraco/vendr/payment/callback/paypal-checkout-onetime/{YOUR_PAYMENT_METHOD_ID}
In the list of events choose “Checkout order approved” and save the webhook.
In the webhooks table node down the “Webhook ID”.
For local testing you’ll need to use something like ngrok in order to expose a public URL for your site that can be called for the webhook. See the stripe docs on how to use ngrok for testing https://vendr.net/docs/payment-providers/stripe/1-0-0/stripe-checkout-onetime/how-to-guides/testing-stripe-webhooks-locally/)
As mentioned, create applications for both your sandbox and live environments.
Configure Umbraco
In Umbraco configure the settings as follows
Continue URL | The site relative URL to continue to after successful payment, ie /checkout/confirmation |
Cancel URL | The site relative URL to return to if a customer backs out of the checkout process, ie /cart/ |
Error URL | The site relative URL to return to if there is an error whilst processing the payment, ie /order-error/ |
Sandbox Client ID | The Client ID of the sandbox app created in the developer portal. |
Sandbox Secret | The Secret of the sandbox app created in the developer portal |
Sandbox Webhook ID | The ID of the webhook created for the sandbox app in the developer portal. |
Live Client ID | The Client ID of the live app created in the developer portal |
Live Secret | The Secret of the live app created in the developer portal |
Live Webhook ID | The ID of the webhook created for the live app in the developer portal. |
Capture | Indicate whether to capture the payment immediately or whether to just authorize the funds. |
Mode | Select whether to process payments in Sandbox mode or Live mode. |
Notes
I guess you’ll need to log into the clients business PayPal account in order to setup the relevant App + credentials but I don’t really think there is a way around this.
When testing, in Sandbox mode you’ll need to use the sandbox personal account credentials that we created earlier.