This discussion is archived
12 Replies Latest reply: Aug 6, 2013 7:49 AM by Raj Jaiswal RSS

Price and Tax info is not update in the Order Repository

Raj Jaiswal Newbie
Currently Being Moderated

Hi All,


I just try to complete a check out flow with all details and submit the order .

But It's not updating  few details like Price and Tax information in the Order repository.That's reason my order shows Incomplete status.

Can any help me to complete this flow.?


Regards,

Raj Jaiswal

  • 1. Re: Price and Tax info is not update in the Order Repository
    Ricky S Explorer
    Currently Being Moderated

    do u see any error in the logs?

    u did any customization to the flow or is it OOTB?

    will need a little more info on the flow..

  • 2. Re: Price and Tax info is not update in the Order Repository
    Raj Jaiswal Newbie
    Currently Being Moderated

    Hi,

    Thank for reply.

     

    I don't see any error in the logs.I am using only out of box functionality.I have used cartmodifierformhandler in my application.If I use ShoppingCartFormHandler instead of

    cartmodifierformhandler It is working fine and order status is also shows Submitted(Status).

     

     

    Regards,

    raj

  • 3. Re: Price and Tax info is not update in the Order Repository
    Ricky S Explorer
    Currently Being Moderated

    CartModifierFormHandler - used to modify the shopping cart by adding items, deleting items and modifying the quantities of items in cart and preparing for checkout. u need to use additional form handlers to finish the flow - like shipping/ payment form handlers and finally CommitFormHandler to confirm and commit the order.

     

    on other hand - ShoppingCartFormHandler provides simpler cart management and checkout implementation all in itself.

  • 4. Re: Price and Tax info is not update in the Order Repository
    Rajeev_R Journeyer
    Currently Being Moderated

    ShoppingCartFormHandler was used in older versions of ATG and ATG recommends not to use that form handler and it is available to support backward compatibility. Check the discussions regarding this, https://forums.oracle.com/thread/2452549

     

    For your issue, while confirming the order i.e at the final step, use /atg/commerce/order/purchase/CommitOrderFormHandler.commitOrder method.

     

    Cheers

    R

  • 5. Re: Price and Tax info is not update in the Order Repository
    Nitin Khare Expert
    Currently Being Moderated
    I just try to complete a check out flow with all details and submit the order .

    But It's not updating  few details like Price and Tax information in the Order repository.That's reason my order shows Incomplete status.

    Can any help me to complete this flow.?

    Adding to the already provided answers: The incomplete order status is normally due to some error in the checkout flow and not because price and tax information is not saved in order repository. See if there is any error when you check out or a transaction rollback. If you see some error, enable loggingDebug on the /atg/commerce/PipelineManager to figure out which processor is causing any error/rollback.

     

     

    ATG has a component /atg/commerce/order/processor/SavePriceInfoObjects and if you look at its default configuration you will see that ATG does not save PriceInfo objects for incomplete orders and they are kept in memory for the current session. Only when an order completes the check out, the PriceInfo objects are saved. The reason for ATG not always saving PriceInfos is that they take space and time for getting persisted in the database and if the order is incomplete, there are chances that the buyer can still modify the order, which means any saved PriceInfos would become obsolete. Although you can change this behavior by reconfiguring the SavePriceInfoObjects component but it won't be optimal.

  • 6. Re: Price and Tax info is not update in the Order Repository
    Raj Jaiswal Newbie
    Currently Being Moderated

    Hi,

     

    I have enabled the log and got below errors.

     

    3:04:50,826 INFO  [CommitOrderFormHandler] DEBUG Acquired local write lock using id 400004

    3:04:50,833 INFO  [CommitOrderFormHandler] DEBUG beforeSet did not create a transaction.

    3:04:50,834 INFO  [CommitOrderFormHandler] DEBUG no form errors - staying on same page.

    3:04:50,835 INFO  [CommitOrderFormHandler] DEBUG no form errors - staying on same page.

    3:04:50,846 INFO  [CommitOrderFormHandler] DEBUG no form errors - staying on same page.

    3:04:50,889 INFO  [CommitOrderFormHandler] DEBUG PipelineError: key=CreditCardVerifyFailed; error={pg970001=The credit card number is not valid.}

    3:04:50,890 INFO  [CommitOrderFormHandler] DEBUG adding form exception: CreditCardVerifyFailed: The credit card number is not valid.

    3:04:50,891 INFO  [CommitOrderFormHandler] DEBUG root cause of exception: null

    3:04:50,892 INFO  [CommitOrderFormHandler] DEBUG Transaction Marked as Rollback - staying on same page.

    3:04:50,892 INFO  [CommitOrderFormHandler] DEBUG Transaction Marked as Rollback - staying on same page.

    3:04:50,894 INFO  [CommitOrderFormHandler] DEBUG afterSet sees no current transaction.

    3:04:50,896 INFO  [CommitOrderFormHandler] DEBUG Released local write lock using id 400004

    4:08:13,518 WARN  [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TransactionReaper_18] - TransactionReaper::check timeout for TX -53eddf60:e28a:51fb5

     

    Even though I have given correct credit card details It shows credit credit is not vaild.

     

    Thanks,

  • 7. Re: Price and Tax info is not update in the Order Repository
    Nitin Khare Expert
    Currently Being Moderated

    Check out process will invoke the validateForCheckout pipeline chain through OrderManager.validateOrder() and the "processOrder" pipeline chain. The validateForCheckout pipeline chain involves a CreditCardModCheck processor which performs credit card validations by doing mod checks on credit card number to see if it is a valid one based on the card type. This is done from verifyCreditCard() method of CreditCardTools. There is no authorization done from payment processing system at this stage. From the error it looks like that it is failing in the card number validation. Check the card number and type again or try using another number or try with test numbers. Refer this for more details:

     

    Oracle ATG Web Commerce - Checking Out an Order

  • 8. Re: Price and Tax info is not update in the Order Repository
    Raj Jaiswal Newbie
    Currently Being Moderated

    As I am using only out of box  component of ATG. I haven't modified any component also here.

     

    I have used CreateCreditCardFormHandler to store User provided credit card details but I think Its not updated in  order object.Because when I am iterating

    cartmodifierformhandler.order.paymentgroup and cartmodifierformhandler.order.paymentgroup it doesn't show any data.

     

    Could you please tell me how to update CreateCreditCardFormHandler data to order object.?

  • 9. Re: Price and Tax info is not update in the Order Repository
    Nitin Khare Expert
    Currently Being Moderated

    I have used CreateCreditCardFormHandler to store User provided credit card details but I think Its not updated in  order object.Because when I am iterating

    cartmodifierformhandler.order.paymentgroup and cartmodifierformhandler.order.paymentgroup it doesn't show any data.

     

    Could you please tell me how to update CreateCreditCardFormHandler data to order object.?

    OOTB CreateCreditFormHandler will only create the CreditCard payment group and will not associate the payment group with the order. For this we need to use PaymenGroupManager's addPaymentGroupToOrder() method like this:

     

    getPaymentGroupManager().addPaymentGroupToOrder(order, creditCardPaymentGroup);

     

    You can use PaymentGroupFormHandler which takes care of associating PaymentGroups to order using PaymenGroupManager as mentioned above and also handles split payments etc. Use PaymentGroupFormHandler.handleApplyPaymentGroups() when user has supplied the payment information to the order and is ready to proceed with the next step during checkout.

  • 10. Re: Price and Tax info is not update in the Order Repository
    Raj Jaiswal Newbie
    Currently Being Moderated

    Hi NitinKhare,

     

    Thanks for reply.

     

    Then Do I need to create a formhandler and  pass order and creditCardPaymentGroup object to this method getPaymentGroupManager().addPaymentGroupToOrder(order, creditCardPaymentGroup);

     

    Instead of doing above,Is there any out of box formhandler where user can add credit card details from UI then we can assign that formhandler to Order object.

     

    Could you please give some more information or any example if it is possible ?

     

    Thanks,

    raj

  • 11. Re: Price and Tax info is not update in the Order Repository
    Nitin Khare Expert
    Currently Being Moderated

    Then Do I need to create a formhandler and  pass order and creditCardPaymentGroup object to this method getPaymentGroupManager().addPaymentGroupToOrder(order, creditCardPaymentGroup);

     

    Instead of doing above,Is there any out of box formhandler where user can add credit card details from UI then we can assign that formhandler to Order object.

    PaymentGroupFormHandler is the one OOTB formhandler which would link your payment group with the order. And in case OOTB formhandlers are not fitting in your requirements or checkout flow, you can even try to extend the CreateCreditFormHandler or PaymentGroupFormHandler to exactly match your requirements.

  • 12. Re: Price and Tax info is not update in the Order Repository
    Raj Jaiswal Newbie
    Currently Being Moderated

    Hi,

    Yes I am extending CreateCreditFormHandler and adding this code getPaymentGroupManager().addPaymentGroupToOrder(order, creditCardPaymentGroup); As you said previously.

    This is the code I have written In my template.

    User is filling credit card details from the UI.

    Please validate the following approach.

     

    <br>FirstName:<dsp:input bean="CreateCreditCardFormHandler.creditCard.billingAddress.firstName" beanvalue="Profile.billingAddress.firstName" size="30" type="text"/>

     

    <br>MiddleName:<dsp:input bean="CreateCreditCardFormHandler.creditCard.billingAddress.middleName" beanvalue="Profile.billingAddress.middleName" size="30" type="text"/>

     

    <br>LastName:<dsp:input bean="CreateCreditCardFormHandler.creditCard.billingAddress.lastName" beanvalue="Profile.billingAddress.lastName" size="30" type="text"/>

     

    <br>EmailAddress:<dsp:input bean="CreateCreditCardFormHandler.creditCard.billingAddress.email" beanvalue="Profile.email" size="30" type="text"/>

     

    <br>PhoneNumber:<dsp:input bean="CreateCreditCardFormHandler.creditCard.billingAddress.phoneNumber" beanvalue="Profile.billingAddress.phoneNumber" size="30" type="text"/>

     

    <br>Address:<dsp:input bean="CreateCreditCardFormHandler.creditCard.billingAddress.address1" beanvalue="Profile.billingAddress.address1" size="30" type="text"/>

     

    <br>Address (line 2):<dsp:input bean="CreateCreditCardFormHandler.creditCard.billingAddress.address2" beanvalue="Profile.billingAddress.address2" size="30" type="text"/>

     

     

                 <dsp:input bean="CreateCreditCardFormHandler.newCreditCardSuccessURL" type="hidden" value="co_confirm.jsp"/>

                <dsp:input bean="CreateCreditCardFormHandler.newCreditCardErrorURL" type="hidden" value="co_confirm.jsp"/>

                <dsp:input bean="CreateCreditCardFormHandler.newCreditCard" type="hidden" value="Enter Credit Card"/>

     

                  <dsp:input bean="AuctionPaymentGroup.order1" type="hidden" beanvalue="ShoppingCart.current.Id"/>

               

                <dsp:input bean="AuctionPaymentGroup.AddPaymentDetailsToOrder" type="submit" value=" Continue -->"/>

                <dsp:input bean="AuctionPaymentGroup.paymentGroupSuccessURL" type="hidden" value="co_confirm.jsp"/>

                <dsp:input bean="AuctionPaymentGroup.paymentGroupErrorURL" type="hidden" value="error.jsp"/>

               

     

     

     

    I have customized CreateCreditCardFormHandler and added below code.

     

    public boolean handleAddPaymentDetailsToOrder(DynamoHttpServletRequest pRequest,DynamoHttpServletResponse pResponse) throws ServletException,

                IOException {

             String pOrder=getOrder1();

           

            try{

                OrderManager orderManager=(OrderManager)pRequest.resolveName("/atg/commerce/order/OrderManager");

               

                Order order = orderManager.loadOrder(pOrder);

               

                System.out.println("orderManager----"+order.getId());

               

                PaymentGroupManager paymentGroupManager=(PaymentGroupManager)pRequest.resolveName("/atg/commerce/order/PaymentGroupManager");

               

                System.out.println("paymentGroupManager----"+paymentGroupManager.getAbsoluteName());

                //Create the PaymentGroup

               

                PaymentGroup paymentGroup = paymentGroupManager.createPaymentGroup();

                //Add the PaymentGroup to the Order

                paymentGroupManager.addPaymentGroupToOrder(order, paymentGroup);

               

            }catch(Exception ex)

            {

                ex.printStackTrace();

            }

       

            return true;

        }




    In the next templates I just want to display  billing details which added by the user .


    regards,

    Raj jaiswal










Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points