Help With A Design Choice ?

Ok lets say i have multiple payment systems to implement in a project of mine say one is paypal,one is just a standard credit card and another is for an admin to do. What is the best way to handle this in yii ?

I’m still kinda getting used to how yii works and i don’t have my head around this kinda thing yet.Do i create a widget that loads a different view based on the payment selected and make a base payment model and extend it to incorporate different requirements,is this the right way to go ?

Or do i make some kind of component ? that does everything needed ? loads the right model outputs a string for the view i mean i am kinda getting lost in it all.

this has been going around my head for a day or so now thinking about what the best options are.

Anyone have any ideas?

Thanks for your time,


Make extension with collection of different payment systems and use it in your controller. User choose payment system, then you show him a selected payment system’s form and send this data to system.