5 Replies Latest reply: Jan 21, 2013 11:07 PM by 877508 RSS

    CashOnDelivery process not working

    951022
      Hi ,

      i have created the new payment group of cash on delivery and its working fine when i give the defaultPaymentGroup to CashOnDelivery manually bt my appication when i click the cash on delivery it will process that payment group.how it is possible? can u help me to find out

      Thanks in advance
        • 1. Re: CashOnDelivery process not working
          877508
          What do you mean manually , can you please elaborate on what you need.

          General Idea

          1 . Define a new payment group cashondelivery
          2. When customer selects that option from the screen , then based on the information you proceed to assign the payment group to the user if it is not specified as default

          Do let me know what is not working and i can help you

          Regards
          Sundar M R
          • 2. Re: CashOnDelivery process not working
            951022
            Hi sundar,

            I have define the new payment group of cash on delivery.. when a user clicks the cash on delivery my application would process the my custom pipeline(Cash On Delivery)..

            how it is possible? as from your answer how should assign the payment group to the user.

            Thanks in advance
            • 3. Re: CashOnDelivery process not working
              951022
              Hi sundar,

              I have define the new payment group of cash on delivery.. when a user clicks the cash on delivery my application would process the my custom pipeline(Cash On Delivery)..

              how it is possible? as from your answer how should assign the payment group to the user.

              Thanks in advance
              • 4. Re: CashOnDelivery process not working
                RMishra
                i have created the new payment group of cash on delivery and its working fine when i give the defaultPaymentGroup to CashOnDelivery manually bt my appication when i click the cash on delivery it will process that payment group.how it is possible? can u help me to find out
                You can refer below thread:
                Re: Cash on delivery in atg

                Create a New payment group


                -RMishra
                • 5. Re: CashOnDelivery process not working
                  877508
                  Hi Raes,

                  1. Create a paymentgroup as follows
                  public class CashXXXX extends PaymentGroupImpl implements PaymentAddressContainer {


                  }

                  2. Provide a choice to the user for choosing the payment type he wants and based on the input populate your payment group.

                  3. Over ride your authorize() , debit() , credit() methods in PaymentManager accordingly to check for the paymentgroup and set payment status accordingly ( you might have to extend the paymentstatus if need be for setting certain fields which may be necessary for this type of transaction , but looking at the OOB class it looks more than sufficient )

                  if (pPaymentGroup instanceof CashXXXX ) {

                  // complete your logic here for what ever your business is
                  }

                  4. The removePaymentgorups processor will take care of removing the empty payment groups if there are no valid relationships existing.

                  Let me know if you still have trouble , we'll see from there

                  Regards
                  Sundar M R