Article ID: 8668, created on Jul 9, 2010, last review on May 10, 2014

  • Applies to:
  • Business Automation 5.0

Problem statement

The Provider has a custom eCommerce plug-in in PBA-E 4.4.x and wants to use it in PBA-E 5.0.


This article will help the Provider convert the old (PBA-E 4.4.x) eCommerce plug-in to a new one (PBA-E 5.0).

The example below is provided for the plug-in MYTEST.


1) Copy the old plug-in (folder with MYTEST sources) to /root/:

# cp -r /usr/local/bm/bm-sdk/EcommercePlugins/MYTEST /root/

UPGRADE to PBA-E 5.0 or perform a clean installation of PBA-E 5.0

2) Run the commands below on the PBA-E 5.0 installation:

# cd /usr/local/bm/share/EcommerceSDK

3) Go to the folder with the old plug-in:

# cd /root/MYTEST/

4) Copy the old files to the new plug-in:

# cp *.type *.lsa ../EcommercePlugins/MYTEST/

Make changes in the files consts.h and MYTEST.h

5) The file consts.h now has the name MYTEST.h. Copy all your own includes, from consts.h to EcommercePlugins/MYTEST/MYTEST.h, if necessary.

MYTEST.h does not need the following includes, which were used in consts.h:
#include "auto_consts.h"
#include "rresult.h"

This is why you may add your own includes and global variables (if you have any) to the file MYTEST.h from the file consts.h.

Make changes in []

7) Drop using the "Trace" class.

We no longer have the "Trace" class. You need to drop lines like the following:

Trace t("...");

Use only the following statement in the methods of the "MYTEST" class:

TRACE_CALL_ARGS(log(), Var1 << Var2 << Var3);

For example, for the method EPluginConfGet:

ItemResult * MYTEST :: EPluginConfGet ( Int PluginID , Int AccountID ){
    TRACE_CALL_ARGS(log(), PluginID << AccountID );

8) To get access to the variables of RDBMS (objects related to database tables), you need to add .value(), e.g.:

MYTESTPaySystemConf conf = ...;
std::string( conf.Password.value() );

9) If you need to get the pure C++ type (e.g., in the event of the compilation error, [`struct rdbms::ASInt' used where a `int' was expected]) use ".c_type()":

MYTESTPaySystemConf conf = ...;
int test = conf.TestMode.value().c_type();

10) Class Int does not have the .str() method anymore. This means that instead of using
Int a; a.str();

you must use
(StrStream() << a ).str();

For example,
should be replaced with
std::string("BK").append( (StrStream() << ActivityID).str())

11) To get the abbreviation of a currency, use oAccount and the field BaseCurrencyCurrencyID, e.g.:


12) Use .c_type() to multiply doubles.

If you need to do arithmetic operations, use .c_type(), e.g.:

doc.Total.value().c_type() * 100.0;

13) UseCVV is in the CreditCard class, not the Payment class.

So, instead of using
if (pay.UseCVV == BOOL_YES) {

if (cardInfo.UseCVV == BOOL_YES) {

where pay is the entity of the Payment class and cardInfo is the entity of the CreditCard class.


14) Using external libs:

If you need to use external libs, you need to change the "wscript" file. Add a new parameter to the method LISA.new_task_gen:

a) Add includes:
includes  = ['.', '/usr/include/your_folder_with_includes']

b) Instead of using -lmyownlib, add the "configure" method:

}def configure(conf):
conf.env.LIB_MYOWNLIB = [ 'myownlib' ]


15) Database initialization (

Edit the file ~/EcommercePlugins/MYTEST/db/init/

By default, the plug-in supports Visa, MasterCard, American Express, and Discover credit cards for currencies ["USD," "EUR," "GBP," "CAD," "JPY"].

Drop Payment Systems from the file if your plug-in is not supported, and add a new additional one if your plug-in supports it.

e.g., adding Laser with USD:
"Laser" => {
  "Settings" => {
    PAY_SYSTEM => "Laser",
    NAME => "Laser",
    LOGO => "/images/amex.gif",
  "Currencies" => ["USD"]

16) Short notice:

  I) Compiling:

  II) Installing:
  waf install

  III) Build RPM:
  waf build --rpm

  IV) Add this string to the file /usr/local/bm/etc/ssm.conf.d/containers-list.dist in the "payment-plugin" section:
  MYTEST = as4 fc8

  V) Configuration:

  VI) Restart plugin:
  /etc/init.d/pba restart MYTEST

For further information, refer to PBA Ecommerce Plug-In SDK.

198398b282069eaf2d94a6af87dcb3ff d863a37023d0fbc15b909ef836e29214 92711db0799e8aefe8e51f12dace0496 caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF