• Welcome to KonaKart Community Forum. Please login or sign up.
 
December 22, 2024, 12:30:49 pm

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - shadders

1
I want to be able to use all the various manager classes.  Sorry I should have been a bit more clear, I slimmed down the code example a bit.

I already have a KKWSEng which I'm using because the konakart engine isn't on the same server as the web front end.  So it's more like:

KKEngIf eng = new KKWSEng();
new MgrFactory(eng).getProductMgr(false);
I'm gussing it falls over inside the getProductMgr() method on the following line

String str1 = KKEng.getKonakartConfig().getString("manager." + paramString1);

Looking inside KKEng it appears the static method KKEng.getKonakartConfig() returns a value that is only set if you invoke the contructor of the KKEng class which I'm not doing since I'm using KKWSEng.

Are these manager class supported with a WS engine?
2
I've been working with konakart API for a while now but I've never been able to invoke any of the manager classes with MgrFactory.

e.g. if I try to use MgrFactory.getProdMgr(true or false) I get the following stack trace:

INFO  - MgrFactory                 - Getting class by name for ProductMgr with a com.konakart.appif.KKEngIf constructor
3740438 [btpool0-7] INFO com.konakart.bl.MgrFactory  - Getting class by name for ProductMgr with a com.konakart.appif.KKEngIf constructor
java.lang.NullPointerException
at com.konakart.bl.MgrFactory.getConstructor(Unknown Source)
at com.konakart.bl.MgrFactory.getConstructor(Unknown Source)
at com.konakart.bl.MgrFactory.instantiateProdMgr(Unknown Source)
at com.konakart.bl.MgrFactory.getProdMgr(Unknown Source)


I'm instantiating MgrFactory like this:

new MgrFactory(new KKWSEng());

I don't think the source is available for MgrFactory as it's in konakart.jar, so I can't step through the code. 

Can you give me any suggestions?  Is this supposed to work with a webservices engine?
3
Happy to debug it but can I confirm that postData(PaymentDetailsIf, List<NameValueIf>) is the correct entry method to invoke the payment?

Am I supposed to passing anything in the NameValueIf list?
4
I'm building a wicket front end for konakart and I've got to the part where I want to test building orders and confirming payment.

I've been through the com.konakart.apiexamples.InsertOrder example but it just kind of skips over the payment part and assumes it's happened.

I've run the example and can see the orders in the admin interface but they show nothing for the payment info.  I came across this post: http://www.konakart.com/forum/index.php/topic,719.msg3240/topicseen.html#msg3240 That talks about the BaseGatewayAction class.  I'm actually using Eway_au gateway module.  This is what I've got so far


PaymentDetailsIf[] pGateways = eng.getPaymentGateways(order, DEFAULT_LANGUAGE);
            if (pGateways != null && pGateways.length > 0)
            {
            for (PaymentDetailsIf gw: pGateways) {
            System.out.println(gw.getRequestUrl());
            System.out.println(gw.getDescription());
            System.out.println(gw.getPostOrGet());
            System.out.println(gw.getPaymentType());
            System.out.println(gw.getCode());
            System.out.println(gw.getTitle());
            System.out.println("--------");
           
            }
                order.setPaymentDetails(pGateways[0]);
                order.setPaymentModuleCode(pGateways[0].getCode());
                order.setPaymentMethod(pGateways[0].getCode());
            }
Eway_auAction eway = new Eway_auAction();
System.out.println(eway.postData(order.getPaymentDetails(), new ArrayList()));
           


Which results in java.net.MalformedURLException

It seems that System.out.println(gw.getRequestUrl()); outputs null but in the admin interface it's set to https://www.eway.com.au/gateway_cvn/xmltest/testpage.asp

If I set the URL manually I get

java.lang.NullPointerException
   at com.konakart.actions.gateways.BaseGatewayAction.hashParameters(Unknown Source)
   at com.konakart.actions.gateways.Eway_auAction.getGatewayRequest(Unknown Source)
   at com.konakart.actions.gateways.BaseGatewayAction.postData(Unknown Source)
   at com.konakart.apiexamples.InsertOrder.main(InsertOrder.java:214)

Could someone post a working example of a call to a payment gateway?