This guide will walk you through the process of integrating PayPal as a payment method, enabling smooth and secure transactions.
Before proceeding, you will also need to create a PayPal Business Account.
You will have to follow PayPal's verification process, which may include linking your bank account and confirming your identity.
PayPal integrations use a client ID and client secret to authenticate API calls:
Here's how to get your client ID and client secret:
After creating app successfully, in the App Details page, you can add Webhook with URL https://yourdomain.com/api/v1/paypal/notify (replace yourdomain.com with your actual domain) and check All Events option as shown below screenshot.
Click Save button on the Add Webhook popup to complete the setup at Paypal's end. You can get the Webhook ID as below. You need to save this value to configure in MetaFox site later.
Log in to the AdminCP of your MetaFox platform using your admin credentials and go to App Settings > Payments. Then click on Edit option of Paypal item as below
On the Edit Gateway popup you can fill in 2 settings of Client ID, Client Secret and Webhook ID that you got above. Then save changes.
To testing payments, you can set up Paypal with Sandbox mode as below