KonaKart Community Forum

Installation / Configuration => Programming of KonaKart => Topic started by: iseekk on July 02, 2013, 11:15:54 am

Title: Inserting new Order object in konakartadmin FAILS
Post by: iseekk on July 02, 2013, 11:15:54 am
Hi all,

I am generating new Order (AdminOrder) object in konakartadmin side and then trying to insert it in db with
(AdminOrderMgrIf) orderMgr.insertOrder(AdminOrder orderObj)

Now this new orderObj contains all the info that such an object could possibly need, but this insertion results in an exception:
"Exception Message = The String parameter called paymentModule (value=null) must be given a value. It cannot be set to null or be left empty."

This is a bit strange as AdminOrder does have such setters as setPaymentModuleCode(..), setPaymentModuleSubCode(..), setPaymentMethod(..), which all now have values, but it does NOT have setPaymentModule(..) separately.

Have any of you tried and succeeded inserting new Order object in konakartadmin side? Is this possibly a BUG? Or should I know of some specific way of setting payment module as the exception suggests? Any help would be appreciated..

BR,
iseekk
Title: Re: Inserting new Order object in konakartadmin FAILS
Post by: ming on July 07, 2013, 06:36:28 am
That insertOrder API needs a fully populated order....  see  http://www.konakart.com/javadoc/admin/com/konakartadmin/appif/KKAdminIf.html#insertOrder(java.lang.String, com.konakartadmin.app.AdminOrder) (http://www.konakart.com/javadoc/admin/com/konakartadmin/appif/KKAdminIf.html#insertOrder(java.lang.String, com.konakartadmin.app.AdminOrder))

It's really only designed for imports of orders from other systems.  Normally you would add orders using the storefront APIs (KKEngIf).


Are you sure you have set values in?:

PaymentModuleCode
ShippingModuleCode

Both need to have values.
Title: Re: Inserting new Order object in konakartadmin FAILS
Post by: iseekk on July 30, 2013, 12:16:58 pm
Hello and thank you!

It seems that missing ShippingModuleCode was indeed the problem. The error message was a bit misleading in this case; PaymentModule info was all there while the error indicated otherwise...