Select version
v7.7 v7.6 v7.5 v7.3 v7.1 v7.0 v6.8 v6.7 v6.6 v6 v5 v4 v3 v2

Setup uCommerce to Include PayPal Subscription as a Payment Method

uCommerce comes with built-in support for PayPal Subscription payments. This guide will walk you through getting uCommerce to work with PayPal Subscription for payment processing.

Capabilities

PayPal Subscriptions support the acquire functionality and recurring payments. To refund or cancel subscriptions you need to use PayPal's adminstration system.

Settings in uCommerce

If you haven't completed the steps from the General Setup of Payment Methods in uCommerce document you need to do that before you move on.

When the payment method is created and saved as described in General Setup of Payment Methods in uCommerce. The back-end displays the different settings you can set for PayPap Subscription. image

Some of the below information are found in the PayPal administration panel, so start by logging in if you haven’t done so already.

Optional: Finding privateCertificatePath, publicPayPalCertificatePath, privateCertificatePassword and useEncryption

If you turn “Encrypted Website Payments” on, the step described in the section "Optional: Encrypted Website Payments" below, needs to be completed. Please go through the steps very carefully.

privateCertificatePath and publicPayPalCertificatePath

If you used the default names earlier in this guide, path of the two files should work out of the box. If you customized them, reflect the changes here.

privateCertificatePassword

Password entered when you created the p12 file. This can be an empty password, but recommended with a password if you are on a shared host.

useEncryption

Set this to “True” used you are using “Encrypted Website Payments”.

Optional: Finding apiUsername, apiPassword, and apiSignature

apiUsername, apiPassword, and apiSignature are all used to access the PayPal remote API to do Acquire, Refund, and Cancel.

Log into you PayPal account and make sure your account is verified.

image

Click on “My Account”, then “Profile”, then "My selling Tools" and at last "Update".

image

On the “API Access” page, Click the “View Api Signatures” link.

image

Here you will find the “API Username”, “API Password” and “Signature”.

image

Finding sandbox

If testing the ingration with a developer account set this to “True” otherwise “False” at a production site.

Finding returnMethod

Leave it at default.

Finding business

Next we need to find your PayPal ID or an email address associated with your PayPal account. Again, click on “My Account” and then “Profile”. Here you can see your “Business” account name. Its usually your email address used, when you signed up for the PayPal account. I have only one, but you could have multiple.

image

Finding notifyUrl

Leave this at “(auto)” if in doubt.

Finding paymentAction

What payment action to take.

· Sale - Finale sale, instant capture.

· Authorization - Authorization for a final sale, to be captured later.

· Order - Just place the order, but authorize & capture later. In most cases you you want “Authorization”.

Finding return

Url the user is returned to after successfully authorizing her credit card.

Finding cancelReturn

Url the user is returned to if she cancels a purchase.

Optional: Encrypted Website Payments

We recommend that “Encrypted Website Payments” is used, so the data sent to PayPal can’t be tampered with. This are some steps involved but again, it’s a security risk not to use this feature.

Getting OpenSSL for windows

OpenSSL is an open source tool for Windows, which is used to generate certificates. You will need to install it to generate the PayPal encryption certificates. OpenSSL can be downloaded here.

Generating the keys

Open a command prompt and as adminstrator, go to the bin directory under the installation directory.

image

To create the private certificate type: “openssl genrsa –out private-key.pem 1024” and press [Enter].

image

For the public certificate type: “openssl req –new –key private-key.pem –x509 –days 365 –out public-cert.pem”

Now it will ask you to enter some information, you can just skip them by pressing [Enter].

image

Now we need to create the p12 file. Type the following in the prompt: “openssl pkcs12 –export –in public-cert.pem –inkey private-key.pem –out my_pkcs12.p12” followed by [Enter].

image

The export password is the PrivateCerificationPassword.

Uploading the public key to PayPal

Log into PayPal, then click on "My Account", then "Profile", then "My selling tools" and at last click on "Encrypted payment settings"

image

Start by downloading the “PayPal Public Certificate” by clicking the download button marked with number 1. Next click the “Add” button marked number 2 on the page.

image

Select the file and click “Add”.

image

Copying the certificates

In the previously step you create 3 files and downloaded 1:

· paypal_cert_pem.txt – downloaded – PayPal public certificate

· private-key.pem – created – private key

· public-cert.pem – created – public key

· my_pkcs12.p12 – created – p12 exchange key

Copy the files to a directory where your uCommerce installation can get access to them. You will most likely have installed umbraco under: “C:\inetpub\umbraco”. A good place for them would be in the uCommerce configuration directory would be: “C:\inetpub\umbraco\umbraco\UCommerce\Configuration” together with the PayPal.config file.

Rejecting unencrypted messages

Log into PayPal, then click on "My Account", then "Profile", then "My selling tools" and at last click on "Encrypted payment settings".

image

Click on the link "Website Payment Prefences".

image

Scroll down to “Encrypted Website Payments” and make sure the radio button “Block Non-encrypted Website Payment” are selected. Scroll down to the button and click “Save”.

image
uCommerce Aps - Studsgade 29B - 8000 Aarhus C - Denmark
Phone +45 61 799 997 - Email info@ucommerce.dk uCommerce logo