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 RBS WorldPay payments. This guide will walk you through getting Ucommerce to work with RBS WordPay for payment processing.
Authorization is available for all plans with RBS WorldPay. If you wish to acquire (capture) or refund payments you need to mail: [email protected] and ask them to setup “Remote Admin”. At the moment it’s not possible to cancel an authorization with the “Remote Admin”.
Add a new payment method, under “Ucommerce –> Settings –> Orders –> Payment Methods”. You can call it whatever you like, here I have used “WorldPay”.
Click the newly created node and select “Worldpay” in the Service drop down list. Fill out the rest of the required information, like where it’s available from under the “Access” tab, pricing and the language tabs. When done click “Save”.
That’s everything in the Ucommerce interface.
Changes needed in the WorldPay administration panel, so it will work with Ucommerce. Make sure when you are logged in that you are in “Production” mode or else you want to able to save the changes. If you can see the “Switch to Test” link on the picture below, you are in “Production” mode.
Edit Payment Pages
This out of scope for this guide, however World Pay offers lots of possibilities for customizing the results pages. You can read more about it here.
In Denmark it is not allowed to capture a payment before the order is shipped, so we need to turn this off. This can different in other countries.
· “Off” means you need to manually capture the payment.
· “0” Means instant capture.
· “1-14” are delay in days before the capture happens.
Changing the setting
· Click “Profile” in the menu to the left.
· Click “Configuration Details”
· Capture Delay: Set the value as accordingly.
· Click “Save”
General changes to the account
Now we need to edit the WorldPay.config file.
You will find the WorldPay.config file in the following location, where “rootdir” is the directory on the computer where you installed Umbraco: “rootdir\umbraco\UCommerce\Configuration\WorldPay.config”. Usually “rootdir” is c:\inetpub.
Some of the below information are found in the WorldPay administration panel, so start by logging in you aren’t already.
Set this value to “True” when testing the integration with WorldPay. When going live set this value to “False”.
Click “Profile” in the menu. The “instId” is the number (normally 6 digits) in the red cirkel.
This is the “callbackPW” from the previous section.
Leave this at “(auto)” if in doubt.
Optional: Finding remoteInstId and authPW
Click the “Profile” link in the menu to the left. Then you will see a screen like the one below.
This is the remoteInstId and is normally 6 digits. This is the authPW, random digits and letters
True/False whether instant capture is On or Off. If you choose “Off” in the instantCapture in the previously section, this values needs to be “False” otherwise “True”.
This is just a text string of your choice. Recommended is just using random digits/letters.
acceptUrl The url you want your customer to return to in case they fullfill the order.
declineUrl The url you want your customer to return to in case they reject the order.
Running a pipeline once payment is authorized can be helpful if you need to complete the order once the customer returns to your site.
To run a “pipeline” once the callback if received and processed, you need to modify the database. If you used the name “WorldPay” for the payment method name, you can run this SQL query in the SQL Server Management Studio.
UPDATE Ucommerce_PaymentMethod SET Pipeline = 'Checkout' WHERE Name = 'WorldPay'
or just edit it manually in SQL Server Management Studio.
Now the default pipeline that comes with Ucommerce will be run after each successful callback. This sets the Basket to an Order, gives it an OrderNumber, and other things.
To be able to acquire, cancel, and refund payments you need to enable two pipeline tasks in the ToCompletedOrder pipeline and ToCancelled pipeline.
The pipeline configuration is found in /umbraco/ucommerce/pipelines.