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.
1. Click ”Merchant profile”.
2. Type in the external ip address of the webserver running the shop.
3. Click “Save”.
1. Click “Merchant access list” in the menu to the left.
2. 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.
· Cancel2
· Complete
· Capture3
· Credit3
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.
If set to “True” you will be prompted to click a button before posting the information to “PayEx” otherwise it will do an autosubmit using Javascript. When running in production, you will want this set to “False”.
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.
1. Click “Merchant profile”.
2. Copy the “Merchant account” number.
The Md5 key is created in the administration panel.
1. Click “Merchant profile” in the menu to the left.
2. Click “New encryption key”.
1. Copy the encryption key.
2. 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.
ToCancelled.config
ToCompletedOrder.config
· Test mode – Make sure test mode if turned off when going live.
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.