Tea Commerce comes with the most popular online payment gateways configurable out of the box but if the one you need is not available then it's quite simple to code your own.

All you need to do is create your own class that inherits from TeaCommerce.Data.Payment.APaymentProvider and then override the necessary methods.

I've created a Tea Commerce payment provider for the Secure Trading payment gateway, the source of which you can download to use in your own projects.

Once compiled, place the assembly in the bin folder like any other.

Next edit the /config/TeaCommerce/teaCommerce.config file to add an entry that lets Tea Commerce know about the new payment provider. Add a line similar to the following but add your assembly and namespace:

<Provider alias="SecureTrading" assembly="assembly.name.goes.here" type="your.class.namespace.goes.here" />

Then edit the umbraco/config/lang/en.xml file to add the following field translations for use by the Tea Commerce back-end:

<key alias="paymentProvider_SecureTrading_sitereference">Site Reference</key>
    <key alias="paymentProvider_SecureTrading_continueurl">Continue URL&lt;br/&gt;&lt;small&gt;e.g. http://domain.com/continue.aspx&lt;/small&gt;</key>
    <key alias="paymentProvider_SecureTrading_cancelurl">Cancel URL&lt;br/&gt;&lt;small&gt;e.g. http://domain.com/cancel.aspx&lt;/small&gt;</key>
    <key alias="paymentProvider_SecureTrading_streetAddressPropertyAlias">Street address property alias</key>
    <key alias="paymentProvider_SecureTrading_cityPropertyAlias">City address property alias</key>
    <key alias="paymentProvider_SecureTrading_countyPropertyAlias">County address property alias</key>
    <key alias="paymentProvider_SecureTrading_zipCodePropertyAlias">Postcode address property alias</key>
    <key alias="paymentProvider_SecureTrading_telephonePropertyAlias">Telephone property alias</key>   
    <key alias="paymentProvider_SecureTrading_version">Version&lt;br/&gt;&lt;small&gt;Usually 1&lt;/small&gt;</key>
    <key alias="paymentProvider_SecureTrading_md5AuthSecret">MD5 auth secret&lt;br/&gt;&lt;small&gt;Optional&lt;/small&gt;</key>

Do the same for any other languages you wish to support of course.

You should now be able to create a payment method that uses this provider and configure it though the Tea Commerce section of Umbraco like you would any of the out of the box payment providers.


This payment provider has been tested and used by a live ecommerce website however you should always test it yourself using your own Secure Trading test account before using it for live transactions.

Further more, the MD5 security hash functionality has not been tested at all so bear this in mind if you plan to use that feature.