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 PayEx payments. This guide will walk you through getting Ucommerce to work with PayEx for payment processing.
Authorization, acquire (capture), refund, or cancel (void) are available for all plans with PayEx.
Add a new payment method, under “Ucommerce –> Settings –> Orders –> Payment Methods”. You can call it whatever you like, here I have used “PayEx”.
Click the newly created node and select “PayEx” 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 you are done click “Save”.
That’s everything in the Ucommerce interface.
Changes needed in the PayEx Merchant Admin, so it will work with Ucommerce.
Click ”Merchant profile”.
Type in the external ip address of the webserver running the shop.
Merchant access list
Click “Merchant access list” in the menu to the left.
Click the “PxOrder.PxOrder” link, so it will be expanded and make sure the following is checked. If they aren’t checked, please contact PayEx support and get them to do it.
Now we need to edit the PayEx.config file.
You will find the PayEx.config file in the following location, where “rootdir” is the directory on the computer where you installed Umbraco: “rootdir\umbraco\UCommerce\Configuration\PayEx.config”. Usually “rootdir” is c:\inetpub.
Some of the below information are found in the PayEx Merchant Admin, so start by logging in you aren’t already.
This will most likely be a “False” unless you are using a test account.
Leave this at “(auto)” if in doubt.
Url the user is returned to after successfully authorizing her credit card.
Url the user is returned to if she cancels a purchase.
Click “Merchant profile”.
Copy the “Merchant account” number.
The Md5 key is created in the administration panel.
Click “Merchant profile” in the menu to the left.
Click “New encryption key”.
Copy the encryption key.
If you click “Save encryption key”, please note that it will overwrite the old one. It’s not possible to get the old key from the admin interface, so keep it in a safe place.
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 “PayEx” 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 = 'PayEx'
or just edit it manually in SQL Server Management Studio.
Now the default piplline 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.
· Test mode – Make sure test mode if turned off when going live.