• Welcome to KonaKart Community Forum. Please login or sign up.
 
May 05, 2024, 04:40:32 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.

Messages - lrkwz

31
Got it!

In webapps/konakart/WEB-INF/jsp/NewProductsWithDetail.jsp


39             <div class="tile-content">
40                 <table class="tile-content" width="98%">
41                     <% int i=0; %>
42                     <tr>
43                         <logic:iterate id="prod" name="prodArray" length="maxRows" type="com.konakart.appif.ProductIf">
44                             <%prod = kkEng.getEng().getProductWithOptions(kkEng.getSessionId(),prod.getId(),-1, kkEng.getFetchProdOptions());%>


Remove line 44 which overwrites prod with default language contents.
32
Ok thank you ... quite fixed ... still the name of the products is in the site default language ...

I've tried kkAppEng.SetLangId() with no success :-(
33
No comments? I think THIS is  a bug
34
Ok thnks I'll combine info.getSecretKey() + ":" + Integer.valueOf(order.getId) and in the callback I'll split it back in order to cleanup.
35
In this case what is going to happen to the secretKeyMap?
is it going to grow over time?

... what about memory usage? 
36
I'm finalizing a new payment module for Banca Sella (Gestpay) and I will contribute it in the forum.

I'm facing a problem in a load balanced environment (two hosts w/ http load balancer).
The bank callback is done though the pubblic address on one of the two machines choosen in base of the load.
But as far as I can understand secret key is stored in memory so if user placed the order wile browsing on host 1 if the callback drops on host two the function call

kkAppEng.getEng().getOrderIdFromSecretKey(secretKey);

fails! :-(

If this is the case the callback will never succed if Tomcat is restarted in the meanwile.

What is the secretKey for?
37
Here are few simple steps to reproduce the problem.


  • Start mysql

  • Start konakart

  • Start browser

  • go to http://localhost:8780/konakart/SetLocale_de_DE.do



Menu is in german (so you can verify locale has benn changed correctly).
The page shows no products.

Thank click ok Konakart logo (goto Welcome.do), product list appears!
38
ok thanks!
39
Same proble even if I configure in struts-config

      <action path="/SetLocale_it_IT" type="com.konakart.actions.SetLocaleAction" parameter="it_IT">
         <forward name="SetLocale" path="/CatalogMainPage.do" redirect="true"/>
      </action>
40
If as firsts action in a new instance of a browser i go to http://localhost:8780/konakart/SetLocale_it_IT.do I am forwarded to Welcome.do with no newProducts.
If I go to http://localhost:8780/konakart/Welcome.do then to http://localhost:8780/konakart/SetLocale_it_IT.do I'm redirected back to the Welcome.do page correctly populated.

I do not want users to have to choose their interface language so I would like to define two virtual hosts such as:


It seems that the prodMgr's newProducts property is empty at firrst access if forwarded from SetLocale_xx_XX.do
41
I I set in the admin send OrderConfirmation = false no mail is sent, if I set it true OrderConfirmation mail is sent and OrderConfPaymenrSuccess is also sent.

My code is:

public class GestpayAction extends BaseGatewayAction {
...
   public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {
...
         // See if we need to send an email, by looking at the configuration
         String sendEmailsConfig = kkAppEng.getConfig(ConfigConstants.SEND_EMAILS);
         boolean sendEmail = false;
         if (sendEmailsConfig != null && sendEmailsConfig.equalsIgnoreCase("true")) {
            log.debug("will send email");
            sendEmail = true;
         }

...
            if (GestpayConstants.SUCCESSFUL_TRANSACTION_VALUE.equalsIgnoreCase(gestpayCrypt.getTransactionResult())) {
               comment = GestpayConstants.ORDER_HISTORY_COMMENT_OK + gestpayCrypt.getAuthorizationCode();
               kkAppEng.getEng().changeOrderStatus(sessionId, orderId, com.konakart.bl.OrderMgr.PAYMENT_RECEIVED_STATUS,
                     sendEmail, comment);

               // If the order payment was approved we update the inventory
               kkAppEng.getEng().updateInventory(sessionId, orderId);
               // If we expect no more communication from GestPay for this order we can
               // delete the SecretKey
               kkAppEng.getEng().deleteOrderIdForSecretKey(secretKey);
               if (sendEmail) {
                  log.debug("Sending payment received mail for order id " + orderId);
                  sendOrderConfirmationMail(kkAppEng, orderId, /* success */true);
               }
            } else {
               comment = GestpayConstants.ORDER_HISTORY_COMMENT_KO + gestpayCrypt.getTransactionResult();
               kkAppEng.getEng().changeOrderStatus(sessionId, orderId, com.konakart.bl.OrderMgr.PAYMENT_DECLINED_STATUS,
                     sendEmail, comment);
               if (sendEmail) {
                  log.debug("Sending payment declined mail for order id " + orderId);
                  sendOrderConfirmationMail(kkAppEng, orderId, /* success */false);
               }
            }

            ipnHistory.setKonakartResultDescription(GestpayConstants.RET0_DESC + " Auth code:"
                  + gestpayCrypt.getAuthorizationCode() + " Bank trans id:" + gestpayCrypt.getBankTransactionID());
            ipnHistory.setKonakartResultId(GestpayConstants.RET0);
            kkAppEng.getEng().saveIpnHistory(sessionId, ipnHistory);
         }

         return null;

      } catch (Exception e) {
...
    }
}

42
I've realized that the OrderConfPaymentSuccess/Failure mail is sent only if you send the OrderConfirmation.

I wish to dsable the OrderConfirmation and send only the OrderConfPaymentSuccess/Failure ... is it possible?
43
Debug Email Sessions = true
but  .. nothing in catalina.out where should I look for it?

I've also added

log4j.logger.com.konakart.bl.Emailer = DEBUG

with no output at all :-( :-(
44
Unfortunately I've already setted the instance ... no success :-(

Of course I'll contribute the gateway as soon all problems are resolved.
45
Programming of KonaKart / no mail from gateway callback
December 07, 2009, 05:58:06 pm
Hello,
    I've realized a payment gateway for Banca sella (Gestpay) starting from the WorldPay sources ... everything works fine but I canno send emails.

The sendOrderConfirmationMail(kkAppEng, orderId, /* success */false) function call does not receive any exception bue the local sendmail isn't called at all.

Other mail (Welcome, changepassword etc) have no prblems.

Any hint? How ca I diagnose the problem?

Thank you.