• Welcome to KonaKart Community Forum. Please login or sign up.
 

new payment module

Started by yonia, April 11, 2013, 09:43:30 am

Previous topic - Next topic

yonia

hi , i added a new payment module with basically copy-paste from another module
and during deployment i get exception.
i can see the new module in the admin application and its configuration are set (also the MODULE_PAYMENT_GEMALTO_ID which is complained)

any suggestions ?

11-אפר 11:34:14 WARN  (?:checkIfReturnable:?) Configuration for key MODULE_PAYMENT_GEMALTO_ID cannot be returned by the API
11-אפר 11:34:14 ERROR (PaymentMgr.java:refreshConfigs:166) Could not instantiate the Payment Module com.konakart.bl.modules.payment.gemalto.Gemalto in order to refresh its configuration.
java.lang.reflect.InvocationTargetException
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
   at com.konakart.bl.modules.payment.PaymentMgr.getPaymentModuleForName(PaymentMgr.java:692)
   at com.konakart.bl.modules.payment.PaymentMgr.refreshConfigs(PaymentMgr.java:162)
   at com.konakart.bl.modules.payment.PaymentMgr.<init>(PaymentMgr.java:90)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
   at com.konakart.bl.MgrFactory.instantiatePaymentMgr(Unknown Source)
   at com.konakart.bl.MgrFactory.getPaymentMgr(Unknown Source)
   at com.konakart.app.KKEng.updateCachedConfigurations(Unknown Source)
   at com.konakart.bl.EngineConfigCacheUpdater.updateConfigs(Unknown Source)
   at com.konakart.bl.EngineConfigCacheUpdater.run(Unknown Source)
Caused by: com.konakart.app.KKException: Cannot return the value of the MODULE_PAYMENT_GEMALTO_ID configuration parameter using the API. (Ask your administrator to set the 'return by API' flag for this configuration parameter if you need it to be returnable)
   at com.konakart.bl.ConfigurationMgr.checkIfReturnable(Unknown Source)
   at com.konakart.bl.ConfigurationMgr.getConfiguration(Unknown Source)
   at com.konakart.bl.ConfigurationMgr.getConfiguration(Unknown Source)
   at com.konakart.app.KKEng.getConfiguration(Unknown Source)
   at com.konakart.bl.modules.payment.gemalto.Gemalto.setStaticVariables(Gemalto.java:134)
   at com.konakart.bl.modules.payment.gemalto.Gemalto.<init>(Gemalto.java:113)
   ... 16 more
11-אפר 11:34:14 WARN  (?:checkIfReturnable:?) Configuration for key MODULE_PAYMENT_GEMALTO_ID cannot be returned by the API
11-אפר 11:34:14 ERROR (PaymentMgr.java:refreshConfigs:166) Could not instantiate the Payment Module com.konakart.bl.modules.payment.gemalto.Gemalto in order to refresh its configuration.
com.konakart.app.KKException: Cannot return the value of the MODULE_PAYMENT_GEMALTO_ID configuration parameter using the API. (Ask your administrator to set the 'return by API' flag for this configuration parameter if you need it to be returnable)
   at com.konakart.bl.ConfigurationMgr.checkIfReturnable(Unknown Source)
   at com.konakart.bl.ConfigurationMgr.getConfiguration(Unknown Source)
   at com.konakart.bl.ConfigurationMgr.getConfiguration(Unknown Source)
   at com.konakart.app.KKEng.getConfiguration(Unknown Source)
   at com.konakart.bl.modules.payment.gemalto.Gemalto.setStaticVariables(Gemalto.java:134)
   at com.konakart.bl.modules.payment.PaymentMgr.refreshConfigs(PaymentMgr.java:163)
   at com.konakart.app.KKEng.updateCachedConfigurations(Unknown Source)
   at com.konakart.bl.EngineConfigCacheUpdater.updateConfigs(Unknown Source)
   at com.konakart.bl.EngineConfigCacheUpdater.run(Unknown Source)

ming

Isn't the problem clearly described in the Exception message?  It even tells you what the solution is:

Caused by: com.konakart.app.KKException: Cannot return the value of the MODULE_PAYMENT_GEMALTO_ID configuration parameter using the API. (Ask your administrator to set the 'return by API' flag for this configuration parameter if you need it to be returnable)

yonia

i understood there was a problem with the configuration but couldn't understand the issue.

needed to flag with isReturnByApi to true .

can someone tell me what is this configuration property ?
in older version 4.1 there wasn't such configuration in the adminapp

ming

In the Changes notes for 6.3.0.0:

  *) Added a "return_by_api" attribute to the configuration parameters.  If
     a configuration parameter has this attribute set to 0 (false), it will
     not be returned by the various getConfigurations() API calls on the
     storefront engine.   This improves performance (as previously all
     configurations were cached for each client session), reduces memory usage
     and tightens security by allowing greater control over which parameters
     are accessible through the engine.  See below for more details on the
     changes that might affect existing custom code that uses these interfaces
     to access configuration values.