Sunday, November 12, 2006

Adding payment methods in WC

Adding the payment method through POLICY table:
Add new policy for the new payment method in POLICY,
add new DoPaymentPolicyCmd,
ProcessOrder will invoke DoPaymentCmd,
DoPaymentCmd will invoke DoPaymentPolicyCmd,
for differnt policy, different impl will be invoked (by registering cmd class at POLICYCMD table).

you can implement your own policy cmd,customized code in DoPaymentPolicyCmd.
for each payment method, you can create a policycmd impl for it.

Need modify this to detail later.

No comments:

Post a Comment