Our site www.viart.com site is operated by latest Viart Shop 5 with default Clear design
ViArt User's Guide (Version 3.6)
Please, see the list of all new features and fixed bugs that were made to all ViArt PHP Shopping Cart releases from version 2.1.1 up to the latest 3.5 version.
14.2.2. PayPal Website Payments Pro
14.2.2. PayPal Website Payments Pro
Prev Index Next

This tutorial covers the following sections:

Back to top


PayPal Website Payments Pro combines a payment processor and a merchant account into a single solution. It enables a site owner to use PayPal like a realtime payment option and doesn't require your customers to visit PayPal's website. Everything is processed on your site and the payment information is sent to PayPal using APIs. PayPal Website Payments Pro is considered to be the fastest checkout method PayPal offers.

Important: The reporting feature is rather limited with Website Payments Pro, so if you expect to have a lot of orders each month it is recommended to use PayFlow Pro instead.

Back to top

Obtaining an account with Paypal

To open a business PayPal account, please do the following steps:

1. Go to PayPal account signup page

2. Login to your account (if you already have one) or Sign Up for a new account (on the left). Please ensure that you set up an account for Business Owners.

3. Go to your Profile (in the main navigation bar) and under the Account Information section click 'API Access'.

4. Click "Request API Credentials" link.

5. On this page, select 'Request API certificate'. Complete the form for the certificate request. It may take some time for you to be approved and granted the certificate.

Important: If you select "Request API certificate" your API Username and API Password will be provided to you on the next page the same way as if you had requested an API Signature but in addition you will have to download the API Certificate. Do not forget to record your API Username and API Password - you will need to specify them in your ViArt Shop Admin console. It is strongly recommended for security reasons to avoid using your PayPal login username/password.

6. To download your API certificate, click 'Download Certificate' on the 'Download or Remove API Certificate' page.

7. You will receive a pop-up dialog asking if you would like to "Open" or "Save" the file. Select "Save". You will be prompted to download a file called cert_key_pem.txt. This file is your API Certificate. In the "Save As" box, select the location where you would want to save your certificate (ex. Desktop, My Documents). Note where you save it, because you will need it later.

8. Once this is done please 'Submit Application' from 'Merchant Tools > Business Solutions > Website Payment Pro'. (Works only for USA and UK customers).

9. The last step is to save the API certificate (which you downloaded) to your webserver.

Important: For security reasons we recommend to save the certificate outside the web root. This means that nobody will be able to download the certificate by entering it’s URL in a web browser.

Note: As PayPal Website Payments Pro is a direct system and the credit card number is taken on your site ensure you have your own SSL setup and enabled on the payment pages so that the credit card details are entered over a secure connection.

Back to top

Setting Up PayPal Website Payments Pro in ViArt Shop

1. Login to your ViArt Shop Admin console.

2. Navigate to Administration > Orders > Payment Systems > PayPal Website Payments Pro and click 'Edit System'.

3. Basic parameters are set in the Admin panel by default. Therefore, enable an option 'Is Active' and scroll down the page to specify the required parameter values:

Note: the values in the example are just samples, please use your unique PayPal API values.


Username - is your API account name.

Password - is your API account password

Note: Your actual Paypal Username and Password will not work.

SSLCert - specify the absolute path to your API certificate (which you retrieved from your Paypal account profile and uploaded to your webserver). The absolute path should be like this: /home/user_name/cert/cert_key_pem.text

Note: To ensure you use a correct path please do the following:

1. Create an empty text file and call it phpinfo.php.

2. Insert the below string to it:

<?php phpinfo(); ?>

3. Save it and upload to the folder where your certificate is located.

4. Type something like www.your_site.com/phpinfo.php in the browser's bar (where your_site.com equals your actual site URL) and click 'Enter'.

5. You will see all the information regarding your server settings. Search for the field SCRIPT_FILENAME where you will see the full path to this file. For example, if you see path like this: /home/user_name/cert/phpinfo.php copy this path and replace phpinfo.php with the correct name of your certificate, i.e. /home/user_name/cert/cert_key_pem.txt. This is the correct path to your certificate.

business - is your business paypal email address (i.e. your.paypal@example.com).

Once all the parameters are set click 'Update' to save the changes and make a test purchase.

Testing on the Sandbox

If you are new to accepting payments through PayPal, it is strongly recommended to switch to the "Sandbox" (test) module to place several test orders and see how it works.

To test with PayPal SandBox please do the following steps:

1. Create an additional sandbox account. Please, refer to this page and follow the steps described to open a test account

Important: Apart from a sandbox API username and API password you will also have to get a sandbox certificate request. (Sandbox certificates are assigned immediately).2. Login to your ViArt Shop Admin console.

3. Navigate to Administration > Orders > Payment Systems > PayPal Website Payments Pro and click 'Edit System'.

4. Change 'sandbox' parameter value to '1'.

5. Make a test purchase.

Important: When testing your PayPal account using the PayPal sandbox you may encounter a problem with the standard test credit card number - 4111 1111 1111 1111. If it does not work for you, please follow the instructions below to generate a test credit card number that is compatible with the PayPal sandbox:

  • Login into your Sandbox Account
  • Click 'Add Credit Card' under Profile section.
  • Then use the CC information to make a payment as a non-PayPal account. Please, ensure you do not click 'Add Card' button. Copy the number down, once you leave the page, the number is gone.

6. Once testing with Sandbox environment is successfully completed return 'sandbox' value to '0'.

Back to top

Frequently asked questions

Can PayPal Website Payments Pro be used for call centre orders?

Yes. PayPal Website Payments Pro (in earlier versions - PayPal Pro (Direct API)) can be used for call centre orders of your ViArt Shop.

How to add PayPal logo to checkout page

To add a PayPal logo image navigate to Administration > Orders > Payment Systems > Edit system > and enter something like:

<img src="http://www.your_site.com/images/paypal_logo_small.gif"> Paypal Paypal Website Payments Pro

to the field 'User Payment System Name'.

where www.your_site.com equals your actual site URL and paypal_logo_small.gif is the name of your PayPal logo image (as uploaded to your server).

Back to top


Error: 'An empty response from the gateway'

Ensure you use an absolute path to your SSLCert, like: /home/user_name/cert/cert_key_pem.txt.

Fatal error: Call to undefined function curl_init()

Most probably it means that the cURL component is not installed on your server. cURL is needed to connect to the PayPal server. PayPal Pro requires communication over a secure (HTTPS) connection and cURL is the only way to make it. If cURL is installed your php.ini file will contain the string: extension=php_curl.dll. If it's not available please contact your host and ask them to enable cURL. More details can be found here

Error: '10501: Invalid Configuration.'

Please, login to your PayPal account and ensure that you have agreed and signed the PayPal Billing Agreement

Prev Index Next