• Welcome to KonaKart Community Forum. Please login or sign up.
 
April 11, 2026, 03:24:48 am

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.

Topics - ReLLiK75

1
I'm trying to understand how the SOAP API is able to work with the KK servlet engine to call the payment gateway.  For example, if I use the following code to create my order:

                   //Create the Order
                    Order order = kkServerApi.createOrderWithOptions(KKSessionID, basketItems, orderOptions, -1);

                    //Get shipping quotess for all installed shipping modules
                    ShippingQuote[] shippingQuotes = getShippingQuotes(order);

                    //Assign the default shipping method to the order
                    if (shippingQuotes.Length > 0)
                        order.shippingQuote = shippingQuotes[0];

                    order = kkServerApi.getOrderTotals(order, -1);

                    //Get payment details for specified payment gateway
                    order.paymentDetails = kkServerApi.getPaymentDetailsPerOrder(KKSessionID, "usaepay", order, kkServerApi.Url, -1);

                    order.paymentDetails.ccNumber= some_number;
                    order.paymentDetails.ccExpiryYear= year;
                    order.paymentDetails.ccExpiryMonth = month;
                    order.paymentDetails.ccOwner=owner;
                    order.paymentDetails.ccType=type;

                   order.id=kkServerApi.saveOrder(KKSessionID, order, -1);

I would expect that by calling saveOrder with the paymentDetails populated, that KonaKart would automatically invoke the UsaepayAction class (provided it's been enabled in the Admin console).  However, this is not the case.  The gateway never gets called and there are no SOAP APIs to forcefully invoke the gateway or to get the response from the gateway, had it been automatically invoked by KonaKart.

Am I missing something here?

The workaround for me has been to write my own SOAP based payment gateway invoker that calls the payment service directly through my C# backend, and then build up the IPNHistory object with the results I get back from submitting a payment to the sandbox.  My concern with doing it this way is that I'm not capturing something that KK captures automatically.  For example, credit card number.  I've read in previous posts on the forum that the CC number is supposed to be returned by ccNumber field on the order object.  Even if I manually set those values before calling saveOrder, it doesn't appear that the credit card info is being saved with the order because I'm not using the KonaKart servlet engine to send the payment.

Aside from using the custom fields, what am I doing wrong?

Thanks!

2

I've got the following code with I've added to the AxisExample.java file.   When I execute the class, the code completes with no errors.


       Basket[] basket=port.getBasketItemsPerCustomer(sessionId, customerId, -1);
       System.out.println("Basket count:  " + basket.length);
       port.createOrder(sessionId, basket, -1)


However, If I try to run similiar code via SOAP (return kkServerApi.createOrder ( KKSessionID, basketItems, -1 );) with the same items in the shopping cart, I get an the following error:

+      $exception   {System.Web.Services.Protocols.SoapException: java.lang.IllegalArgumentException: argument type mismatch
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at EPCProxy.KonaKartServer.KKWSEngIfService.createOrder(String in0, Basket[] in1, Int32 in2) in C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\EPCProxy\EPCProxy\Web References\KonaKartServer\Reference.cs:line 2393
   at EPCProxy.EPCProxy.createOrder() in C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\EPCProxy\EPCProxy\KonaKart.cs:line 183}   System.Exception {System.Web.Services.Protocols.SoapException}


Please help!
Thanks!
3
Programming of KonaKart / Currency in Order Object null?
December 05, 2008, 01:11:40 am
Is the currency object that gets returned by within the orderArray of Orders when calling getOrdersPerCustomer supposed to be null?  I've verified using your java examples that it does, in fact get returned as null while properties like currencyCode and currencyValue get returned with values.

Thanks!
4
I'm trying to figure out how KK serves up the url for DigitalDownloads.  I'm using only using the SOAP API to communicate with KonaKart, which includes the dynamic creation of products and adding basket items, but it looks like there is no API call that will return the full link for a DigitalDownload.  I know the DigitalDownload object contains a Product object which includes the filepath, if the product is a DigitalDownload, but the filepath isn't going to help any in a distributed environment, where KK is residing on a different server than my SOAP application--security restrictions won't allow access to the file via filepath.

Taking a look at the some of the java classes included with KK, specifically DigitalDownloadAction, it seems that the link button references this bit of java code that decides whether or not to send the file to end user. 

Wouldn't it make more sense and be more secure if getDigitalDownloads or some new API call was available that returned an encrypted URL that directly referenced the file to be downloaded?

If there is no way of getting this full link, is there some way I replicate what KK is doing on the My Account page by sending a request to "http://<some server>:8780/konakart/DigitalDownload.do?prodId=xx".  I know I can't do this directly because the session credentials will not be the same between my Flex app and simply making the above http request.  I could send the request to my own FileDownload.aspx and pass in the filename from the Product object, but that pretty much by-passes all KK security.

Any help would be greatly appreciated!
Thanks!
Wayne
5
Initially, I thought I was doing something wrong, but I've now been able to confirm that there is definitely a bug in the SOAP API.  No price information is ever returned when getting basketItems or expliciting calling GetProduct for a given item in the basket.

I programmatically (using SOAP) created a new product and set the priceExTax attribute to $150.  I then log into KK, find that product and add it to my cart.  My cart then shows my programatically created item with the correct price of $150.  I log out of KK, and run a test application (again, using SOAP) to get my basket items and also get full products (using the GetProduct API) for each item in my basket, which in this case is only one item.  I can see in my debugger that getBasketItemsPerCustomer returns the correct basket item and getProduct returns the correct product, however, there is no pricing info in either the basket object or the product object.

Help!
6
Hi There...

Looks like I'm providing a good bit of activity in the forums, so hopefully my questions will help others who are looking to do or will be looking to do something similar.  :)

Anyway...I'm trying to use the admin version of the searchProducts api (vs the server version).  One of the parameters for the searchProducts API is an AdminProductSearch object.  The examples all show doing a search to return all products belonging to a certain manufacturer or within a certain category, but I need to find a single product belonging to a category and with a specific name.  I tried the following code, however the search results come back empty:

           AdminDataDescriptor adminDataDescriptor = new AdminDataDescriptor ();
            AdminProductSearch adminProductSearch = new AdminProductSearch ();

            adminProductSearch.searchText = "Beloved";   //Beloved is the name of an existing DVD within the sample KK data
            adminProductSearch.categoryId = categoryID;  //categoryID is a passed in value
            adminProductSearch.whereToSearch = -100;   //According to the javaDoc, -100 means "search within all fields"

            adminDataDescriptor.limit = 5;

            if (adminSessionID == null)
                adminSessionID = kkAdminApi.login ( adminUserName, adminPassword );

            AdminProducts adminProducts = kkAdminApi.searchForProducts ( adminSessionID, adminDataDescriptor, adminProductSearch, -1);
            if (adminProducts != null && adminProducts.productArray.Length > 0)
                return true;
            else
                return false;

What am I doing wrong that would cause the search to fail?  The reason I'm trying to implement this code is that I'm dynamically creating products in the KK database.  I only want to create a product if it doesn't already exist.  The only things I have to test against are the categoryID to which the product will belong and the product's name. 

Thanks!
Wayne
7
When I make this API call against an order that has been created using the default OTB data set, all price fields are null for each OrderProduct object in the orderProducts array.  Am I missing something?  Despite the fact that i have an OrderProduct object, do I need to make an explicit call to getProduct()  in order to get the Product price?  If this is the case, what are the price fields on the OrderProduct object used for?

Thanks!
Wayne
8
Programming of KonaKart / Multiple Shipping Addresses?
November 13, 2008, 08:58:04 pm
I'm trying to figure out how to implement a different shipping address per line items in the shopping cart.  In my UI, I support being able to select a different shipping address address for each item in the cart.  The only way I can see that may work is to use one of the custom fields on the Basket object and assign an Address object to it.  No problem here.  What I'm confused about is the Order object that insists an order can only have one shipping address.  The default functionality bases all shipping assumptions on the fact that the order is going to a single address.  So aside from using a custom field on the Basket object to store an Address, is there another way within the KonaKart framework to implement such functionality so that the shipping modules will work correctly?

Thanks!
Wayne
9
Programming of KonaKart / Help with API Parameters
November 04, 2008, 04:18:05 pm
Hi there!

I'm currently looking into the possibility of placing a Flex front-end on top of KonaKart via the SOAP APIs.  The front-end is already written and currently works with an "asset-management" type of system to display products for sale.

When I take a look at the wsdl, all the method parameters show up as in0, in1, in2, etc.  There are a couple which a pretty obvious (login, for example), but the majority I have no clue what each parameter is supposed to map to.  I've looked through a good amount of the available documentation and haven't been able to come up with anything that will provide me with the detailed API method parameters. 

Can you please tell me how I go about determining what parameters correspond to what object?

Also, as I mentioned previously, all of my products currently exist in a different SQL Server database. Information about each item for sale needs to come from this database (as it currently does).  Is it possible to use KonaKart simply for customer management/order management/order history?  Is it possible to create an order without having placed anything in the KonaKart basket (maybe dynamically populate the cart and create the order at the same time).  Is it possible to place an object in the KonaKart basket that doesn't already exist as a KonaKart Product object?  Our system directly integrates with ERPs to query in real-time qty on hand, and pricing info.  What I would like to be able to do is take my Product object that contains the real-time info from the ERP and then programmatically create a KonaKart Product object.  I don't see an API to create a KonaKart Product object programmatically, which is something I'd need to do if the only thing that can go in the KonaKart basket is a KonaKart Product.

Thanks!

Wayne