This guide helps to set up PayPal in Commerce application of IPS and to test purchases, renewals, commissions and withdrawals safely. The payment method applies not only to Commerce products. You can use it throughout the entire community and in the 3rd party applications. There are some examples:
- Subscriptions (a feature of IPS Commerce application)
- Downloads (IPS application for selling digital products)
- Paid Clubs (IPS application to build paid membership clubs within your community)
- Donations (a feature of IPS Commerce application)
- Referrals (a feature of IPS Commerce application)
- Classifieds System (3rd party application)
- Links Directory (3rd party application)
- Pay to pin or feature any content (3rd party application)
- Printful Commerce Integration (3rd party application to sell merchandise products)
- Raffles System (3rd party application)
- Crowdfunding (3rd party application)
- VideoBox - Video & Livestream Sharing Platform
The best way to test PayPal payments is to use a so-called "sandbox". This is a test environment of PayPal that does not affect real payments but act as it were. With sandbox, you can test and optimize all screens and messages sent out by PayPal and Invision Community.
To play with PayPal you need access to Developer Dashboard. If you don't have an account there, click on sign up. For testing you need a PayPal application, at least one business account and one or more personal accounts. Later on when you go live you will need a real app and a real business account on PayPal to be able to receive the payments and create payouts.
In your Developer Dashboard go to My Apps & Credentials. Pay attention to the switcher between Live and Sandbox.
Select Sandbox. You will find a Default Application already created there. Use this application for testing or create your own. Click on the application name to see credentials. Note your Client ID and Secret. You will be asked to enter these credentials in Invision Community later on.
Choose My Account on the left side menu and scroll down to the section with permissions. You need to enable the permission for Subscriptions.
Follow instructions on PayPal to enable it.
Now we configure the sandbox in Invision Community that you are going to use test environment and test accounts. You need access to FTP to edit or create a file constants.php. Add the following line to it:
From now Invision Community will use sandbox for PayPal payments. Do not forget to remove or uncomment the line later on.
In your AdminCP go to Commerce -> Settings, choose the tab Payment Methods and click on Create New. Select PayPal in the list of Payment Methods and fill out the form.
These are Client ID and Secret you have noted from the Default Application in the PayPal Developer Dashboard.
Sandbox business account will receive the payments from personal accounts. Each time you test the payments use one or different personal accounts from the PayPal sandbox. Then log in with your sandbox business account to check the payments.