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.3. PayPal Express Checkout
14.2.3. PayPal Express Checkout
Prev Index Next

This tutorial covers the following sections:

Back to top


PayPal Express Checkout method operates with API interface and is a part of Website Payments Pro that allows your customers to select their preferred PayPal account and automatically check out using their PayPal information without having to fill out their personal information again on your shopping cart order form. PayPal Express Checkout gives your customers choice over their payment method and can be used in conjunction with other payment methods as well as with PayPal Website Payments Pro.

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.

Back to top

Setting Up PayPal Express Checkout in ViArt Shop

1. Login to your ViArt Shop Admin console.

2. Navigate to Administration > Orders > Payment Systems > PayPal Express Checkout 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 Express Checkout 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

Adding a FastCheckout button on the basket page

PayPal Express Checkout requires adding a fast checkout button to the basket page. To add the Fast Checkout button please do the following:

1. Login to your ViArt Shop Admin console.

2. Navigate to Administration > Orders > Payment Systems > PayPal Express Checkout and click 'Edit System'. Switch to 'Fast Checkout' tab and fill the fields as shown below:

3. Click 'Update' to save the changes and make a test order. On the basket page you should see the Fast Checkout button:

Back to top

How PayPal Express Checkout works

Paypal Express works the following way:

1. Add a product from the site and go to the checkout (order_info.php) page where you select PayPal Express as a payment method.

2. Enter personal details, scroll down the page and click 'Continue'.

3. You are forwarded to a PayPal site where you should login with your paypal account details.

4. A page with general information (like Payment method, Send To, email address) is shown.

5. Click 'Continue' and you will get back to your website where you'll see all the information for your order as well as personal and delivery details.

6. Check all the details. If they are correct click 'Continue' to pay for the order.

7. You will get to 'order_final' page and see a confirmation on the purchase.

8. The purchase through PayPal Express Checkout is completed.

The advantage of Express Checkout method is that your customer is not required to reenter shipping, billing, or payment information, cause it is already available from PayPal. Thus, it makes a checkout process more simple.

Back to top

Frequently asked questions

Can PayPal Express Checkout be used for call centre orders?

No. PayPal Express Checkout can't be used for Call Centre orders. Instead you can use PayPal Website Payments Pro.

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 Express Checkout 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

Back to top

Patches and updates

version 3.6

3-d secure upgrade option for Maestro Card Transactions

Prev Index Next