Ucommerce includes full API reference documentation and lots of helpful articles to help you build your e-commerce site as effortlessly as possible.
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.
PayPal Subscriptions support the acquire functionality and recurring payments. To refund or cancel subscriptions you need to use PayPal's adminstration system.
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.
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.
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.
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.
Click on “My Account”, then “Profile”, then "My selling Tools" and at last "Update".
On the “API Access” page, Click the “View Api Signatures” link.
Here you will find the “API Username”, “API Password” and “Signature”.
If testing the ingration with a developer account set this to “True” otherwise “False” at a production site.
Leave it at default.
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.
Leave this at “(auto)” if in doubt.
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”.
Url the user is returned to after successfully authorizing her credit card.
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.
To create the private certificate type: “openssl genrsa –out private-key.pem 1024” and press [Enter].
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].
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].
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"
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.
Select the file and click “Add”.
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".
Click on the link "Website Payment Prefences".
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”.