Windows - Version 1.4.5

What's new!

  • Added support for sending signature after the transaction is processed (as a field in CoreUpdate)
  • Added support to register a Secure Card via payment request without MerchantRef
  • Various Bug fixes and improvements
  • Fixed various Sample App issues
  • Fixed various Sample App issues
  • Added support for sending signature after the transaction is processed (as a field in CoreUpdate)
  • Added support for sending device serial number to the server for all BBPos devices
  • Added support to register a Secure Card via payment request without MerchantRef
  • Transaction can now be started in a quick-chip mode for BBPos devices
  • Various Bug fixes and improvements
  • Fixed various Sample App issues
  • Fixed various Sample App issues
  • Added support for sending signature after the transaction is processed (as a field in CoreUpdate)
  • Added support for sending device serial number to the server for all BBPos devices
  • Added support to register a Secure Card via payment request without MerchantRef
  • Transaction can now be started in a quick-chip mode for BBPos devices
  • Various Bug fixes and improvements
  • Fixed various Sample App issues
  • Fixed various Sample App issues
  • Added support for sending signature after the transaction is processed (as a field in CoreUpdate)
  • Added support for sending device serial number to the server for all BBPos devices
  • Added support to register a Secure Card via payment request without MerchantRef
  • Transaction can now be started in a quick-chip mode for BBPos devices
  • Various Bug fixes and improvements
  • Fixed various Sample App issues
  • Fixed various Sample App issues
  • Various Bug fixes and improvements

Introduction to The SDK

The CoChip SDK is a library for communicating with the PayConex Plus Payment Gateway. The SDK wraps a set of interfaces to communicate with the PayConex Plus payment gateway, with the card device reader libs and the client's side security.

For further reading, visit Understanding the SDK for an explanation on how the interaction between the components happen.

Please follow the steps int the section below to implement your solution.

If you have questions, please talk to us using the Contact link at the top (right side) of this page. We would love to help!

Download The Components

Step 01 - Download the SDK

The SDK has two main components: CoChip SDK and Plugins (Optional).


If you are using a card reader device, don't forget to select the check box for the plug-ins above before hitting the Download button. The SDK, and the chosen plugins, will be downloaded simultaneously.

==== Step 02 - Download the Sample App ====c

The Sample App is a demonstration of how to use the CoChip SDK in your own app.

If you are developing your own application from scratch, we recommend that you use the Sample App to assist you in your testing. The Sample App can also help in the implementation of your own logic and provide a base for your development work.

Download Sample App

Basic Settings and Initialisation

Step 01 - SDK Installation

The installation of the SDK is as easy as adding the CoChip SDK to your project. For that you need:

I) Install .Net Framework 4.5.1

II) Extract the CoChipSDK.zip.

III) Copy coresdk.dll, NewtonSoft.Jsoon.dll and HashLib.dll from library extracted folder to the application folder.

IV) In solution explorer, right click the project file and select Add reference. Find coresdk.dll, NewtonSoft.Jsoon.dll and HashLib.dll and click OK.

V) Add the payconfig.xml into your project. Select payconfig.xml, in the file properties select under “Copy to Output Directory” to “Copy Always”. Select under Build Action to “Embedded Resource”.

The payconfig.xml file contains URLs used to access the servers, so don't forget to add it to your project, or the communication is not going to happpen.

If you want to start with the Sample App, just follow the steps of creating a new project from an existing source. Each IDE works in a different way, but when creating a new project, most offer an option to create based on an existing project or based on source files where you just have to point to a repository. This repository would be the decompressed folder of the Sample App in the last step of the previous section.

Step 02 - Implementing the CoreAPIListener

The application needs to implement the Core API Listener (CoreAPIListener) to interact with the SDK.

On Windows this makes the most sense in the MainPage, as follows:

  • public sealed partial class MainPage : Page, CoreAPIListener{


For further reading on CoreAPIListener, consult the Core API Listener page at the SDK Documentation section.

Step 03 - Terminal Initialisation

I) An instance of a Terminal must be created first.

Where this is an object that implements the CoreAPIListener (i.e. this code snippet is done inside the MainPage)

  • Terminal terminal = new Terminal(this);

Also, to establish SSL/TLS connection to the server, you need to add the following piece of code.

  • ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;


II) Now, set the Terminal Mode, (TEST, DEV or LIVE), depending on your needs.

This is an easy one as well. All you have to do is to set the terminal mode to the right type.

The Test Mode should be used for development - It's going to make your app to use the gatewayTestUrl defined in payconfig.xml when communicating with the server. Before initiate your Terminal, enable the Test Mode:

  • terminal.setMode(CoreMode.TEST);


After finishing the development of your app, don't forget to change the mode again to go Live (Live Mode, that points to gatewayLiveUrl defined in payconfig.xml file).

  • terminal.setMode(CoreMode.LIVE);


You still have one option: the Dev Mode.

  • terminal.setMode(CoreMode.DEV);


The Dev Mode is used to point to gatewayDevUrl defined in payconfig.xml file. The Dev Host usually contains unreleased features.

III) Once the Terminal is created, initialize it.

The arguments are the terminal ID and secret. These are credentials required to use a Terminal using the SDK.

  • terminal.InitWithConfiguration(TERMINAL_ID, SECRET);


Step 04 - Handling the Initialisation Response

Once the Terminal is initialized, it is necessary to handle all response types.

The Terminal initialization attempts to connect to the server and the response must then be verified. The SDK does that with the methods: OnError and OnSettingsRetrieved.

Successful Response

If your initialization worked properly, without problems, your application is going to receive the response at the OnSettingsRetrieved method.

  • public void OnSettingsRetrieved(CoreSettings settings) {
    	// ...
    }


You need to use the argument returned to extract the response.

Unsuccessful Response

If anything went wrong with the initialization, your application is going to receive an error at the OnError method.

  • public void OnError(CoreErrorType error) {
    	// ... treatment for initialization error
    }


In the event of an error, your application can show the error text, a generic message or execute a particular action, based on the error.

Step 05 - Plugin Installation

Step 1 - Extract downloaded plugin.

For Ingenico devices

I) On 32 bit systems the environment variable “Path” should be set correctly to ensure all the RBA_SDK dlls in “Resources” folder can be found by the application. Copy the path to “Resources” folder(contains necessary DLLs) and add this path to your machine’s Environment System Variable “PATH”.

II) On 64 bit systems. RBASDK.DLL is a 32-bit library and it needs to be run in 32-bit compatibility mode on a 64-bit machine. To do this, copy all the dlls from “Resources” folder to “C:\Windows\SysWOW64” folder.

III) Microsoft runtime libraries(msvcp100.dll, msvcp110.dll, msvcr100.dll, msvcr110.dll) should also be installed in the system if not already installed. You can either install ‘Microsoft Visual C++ Redistributable Package (x86)’ or you can manually copy these DLLs in “C:\WIndows\SysWOW64” folder.

IV) Copy ingenico.dll and RBA_SDK_cs.dll from the extracted folder to the application folder.

V) In solution explorer right click the project file and click Add reference. Find ingenico.dll and RBA_SDK_cs.dll and click OK.

VI) Make sure the target is set to x86 architecture.

For Idtech devices

I) Copy all dll files from the extracted folder to the application folder.

II) In solution explorer right click the project file and click Add reference. Find idtech.dll and IDTechSDK.dll and click OK.

III) In solution explorer right click the project file and click Add Existing item. Find all other dll files and click Add. Select each dll file under properties select under “Copy to Output Directory” to “Copy Always”.

Step 06 - Initialize the Device

Now we can initialize the device using our Terminal.

The first argument is a DeviceEnum corresponding to the device your application is going to use. The second argument is a connection type. The third argument is used when it's necessary to send details to establish the communication.

For Ingenico Devices

In this scpecific case, we have to inform the portName to be used. The “portName” is a serial port where the device is connected to.

  • string[] ports = System.IO.Ports.SerialPort.GetPortNames();


So, after getting the list of port names, add one of them to a data object and use it to init the device.

  • Dictionary<string, object> data = new Dictionary<string, object>();
    data.Add("portName", ports[0]);
    terminal.InitDevice(DeviceEnum.INGENICO, DeviceConnectionType.USB, data);


For Idtech Devices

Just init the device.

  • terminal.InitDevice(DeviceEnum.IDTECH, DeviceConnectionType.USB, null);


For further reading on how to execute transactions, go to the Default Mode subsection or explore one of the options at the Transaction Flows section.