The PayPal Access for Joomla! extension allows you to authenticate users against the PayPal Access webservice, allowing easy authentication but also the inclusion of certain PayPal details within the Joomla! site. This guide helps you through the installation and configuration of PayPal Access.
Installing and configuring the Joomla! extensions
The PayPal Access for Joomla! extension actually exists out of 3 different extensions:
- Module: The module displays a simple form with a PayPal-button on your site. Once the button is clicked upon, a new popup will open, starting the authentication process.
- Component: The popup will load the component-page. The component first checks whether the user has already been logged in, and if not,
- Plugin: Once the user has been authenticated using PayPal Access, the user is redirected back to the component. To make sure all Joomla! events are passed correctly, the Authentication Plugin is then called manually by the component, making sure that the Joomla! session is updated correctly and that third party extensions can be notified.
Install all 3 extensions. Afterwards, enable the Authentication - PayPal Access plugin using the Joomla! Plugin Manager. The ordering of this plugin is not relevant. Also, create a new PayPal Access module-instance using the Joomla! Module Manager and assign it to a module-position of your frontend.
As a first test, it's a good idea to configure the module with the Debug option set to Yes. This allows you to inspect whether the PayPal Access authentication has any effect.
There is no backend for the component.
Register a new PayPal application
On the PayPal Developer site, you can register for a new API-application to be used with this extension. Browse to the URL https://developer.paypal.com/webapps/developer/applications/myapps. If you have no account yet, you need to register first. Once logged in, click on Create App.
First, you are being asked to name your application. As Application Name, just use something to identify your Joomla! site with.
Within the registration form, make sure to enter the following details under App Details:
- App Redirect URLs: Enter the root of your Joomla! site as redirect URL for both the testing environment (sandbox) as the live site.
Before continuing, take note of the Client ID and the Secret for either the testing environment (sandbox) or the live site (you need to expand this to see the details). Write these values down because you need to configure them in the Joomla! component.
Within the same registration form, make sure to configure also the App Capabilities:
- Accept Payments: This option is not required, and perhaps security wise, even recommended to keep turned off. Note that once you turn this off, you have to run through all other options to make sure they are still configured properly.
- Log In With PayPal: This option is required. Make sure to go to the Advanced Options as well:
- Place checkmarks for all 4 groups (Basic Information, Personal Information, Address Information and Account Information).
- Make sure the Customer Support URL is entered.
- Do not enable any of the Additional PayPal Permissions.
Once completed, hit Register Application or Save. Normally, registration takes place on the spot - meaning that your application should be working right away. In the past, we have seen that the API-servers are sometimes overloaded, so that registration takes some more time to be completed.
Configuring the component
Now login into your Joomla! backend, and navigate to the PayPal Access component. Open up the Parameters in the top right and configure the Client ID and the Secret values received from the PayPal site. Note that you need to cofigure a different set depending on the environment you are using (live or sandbox). We recommend you to use the live data right away. There's no harm in that. The sandbox-environment should be seen more for developers.
Testing the setup
Everything should be in place. In your Joomla! frontend, you should be able to see the PayPal Access module. Hit the button and popup will open up. Within the popup, you will see the HTML-content being loaded from the PayPal Access API. When everything is setup correctly, PayPal will ask you whether you want to authenticate against PayPal Access. If this is the first time that you access PayPal Access from this site, there is also a notification about this Joomla! site gaining access to PayPal Access.
Once PayPal Authentication is completed, the Joomla! Authentication Plugin should pick up the details and complete the authentication process. When the module has the Debug-option enabled, it will display the extra PayPal fields. When the debug-fields only contain a token, this means that the authentication using either Basic or Advanced mode did not work as expected. Hit the Reset-link to try again.
When the debug-fields contain fields like email, first and last, then you will know that the PayPal Access authentication was successfull, and also the corresponding Joomla! user should have been logged in.
PayPal Access Error: No OpenID server found. When you receive this error, probably the outgoing call from your webserver to the PayPal Access server failed. Check whether the DNS-configuration of your webserver resolves external addresses correctly. Also make sure the PHP-option allow_url_fopen is enabled.