0
I Use This!
Activity Not Available

Project Summary

Zeta CoposA small .NET library that encapsulates calls to the payment backend provider "COPOSweb" from Germany's Commerzbank.

IntroductionWhen you want to sell your product to your customers through an online shop, you somehow have to enable the customers to pay for your products. There are several 3rd party companies (like e.g. Plimus) that provides those services for online shops.

Since we wanted to give the customers a single UI experience and those 3rd party solutions usually do redirects to their own servers, we searched for an alternative solution to use in the online shop for our CMS Zeta Producer.

We found a web service (no real SOAP but similar) offered by Germany's Commerzbank, called "COPOSweb".

Since no .NET interface to the COPOSweb web service existed, we developed our own wrapper/encapsulation library which is presented in this article.

Requirements for usingIn order to successfully use the library and the COPOSweb web service you must fulfill the following requirements:

Have a .NET application/online shop to actually use the library (obviously). Be a German resident (unsure; maybe the sell their services worldwide, too). Sign a contract with Commerzbank to get account data. Using the codeThe usage of the code should be rather straightforward; I have included a unit test in the source download.

To summarize a typical call to the COPOSweb web service through the ZetaCops library would look like:

// Each call needs a unique ID.
var id =
Math.Abs( Guid.NewGuid().ToString( @"N" ).GetHashCode() ).ToString();

// Create a new client instance, providing your account login data.
var copos =
new CoposClient(
@"https://coposweb.companydirect.de/posh/cmd/posh/tpl/txn_result.tpl",
@"COPOSUSER",
@"COPOSPASSWORD" );

// Charge the given credit card with the given amount.
copos.DoPaymentCreditCard(
id,
@"1234123412341234",
@"123",
new DateTime( 2014, 04, 01 ),
Iso4277CurrencyCodeEnum.EUR,
1.0m );In a real-world project the id would e.g. be your basket's unique ID and the credit card data would come from the online shop's front-end, entered by the customer. Similar, the amount and the currency depend on the product(s) being choosen by the customer to purchase.

Since it is a bad idea to hard-code your COPOSweb user name and password directly into the source code, I developed an extension that can be used inside your .NET application configuration file (usually "web.config") to configure all data through the config file only, without changing your source code.

A typical web.config file would look like:





...




The tag allows you to define proxy settings for calling the COPOSweb web service.

EpilogIn this article I introducted you a library to call a payment processor's backend web service. Probably the solutions is rather specific and tied to the COPOSweb web service of Commerzbank. If you want to use different backends you could at least take the source code described here as a basis for your own extensions.

We are using the library since approx. 3-4 years and having successfully processed several thousands of payments with it. So the code should be very stable and reliable.

As always, I would love to get your feedback, suggestions and enhancements. Feel free to drop me a note in the Issues section of the article.

History2009-08-04 - First release.

Tags

copos creditcard c-sharp invoice money net payment

In a Nutshell, zetacopos...

 No code available to analyze

Open Hub computes statistics on FOSS projects by examining source code and commit history in source code management systems. This project has no code locations, and so Open Hub cannot perform this analysis

Is this project's source code hosted in a publicly available repository? Do you know the URL? If you do, click the button below and tell us so that Open Hub can generate statistics! It's fast and easy - try it and see!

Add a code location

GNU Library or "Lesser" GPL (LGPL)
Permitted

Commercial Use

Modify

Distribute

Place Warranty

Use Patent Claims

Forbidden

Sub-License

Hold Liable

Required

Distribute Original

Disclose Source

Include Copyright

State Changes

Include License

Include Install Instructions

These details are provided for information only. No information here is legal advice and should not be used as such.

All Licenses

This Project has No vulnerabilities Reported Against it

Did You Know...

  • ...
    Black Duck offers a free trial so you can discover if there are open source vulnerabilities in your code
  • ...
    data presented on the Open Hub is available through our API
  • ...
    use of OSS increased in 65% of companies in 2016
  • ...
    learn about Open Hub updates and features on the Open Hub blog

 No code available to analyze

Open Hub computes statistics on FOSS projects by examining source code and commit history in source code management systems. This project has no code locations, and so Open Hub cannot perform this analysis

Is this project's source code hosted in a publicly available repository? Do you know the URL? If you do, click the button below and tell us so that Open Hub can generate statistics! It's fast and easy - try it and see!

Add a code location

Community Rating

Be the first to rate this project
Click to add your rating
   Spinner
Review this Project!
Sample ohloh analysis