#Credit Card payment system on laravel 10

10 messages · Page 1 of 1 (latest)

barren frost
#

Hi, I am an intern and I am charged to put a new feature about buying credits with credit card, on a project.
We have already an api related to the bank in our country so we call it for paying.
My question is that : where I am supposed to put the function that handle the system of payment, in the model related to it or in the controller related to it ?
At Uni, our teacher suggested to put all logics in models (I am tempted to follow that because I think it is the good way to do it)

But if anyone have some tips, that can help me to improve my feature, I'm open to advices. I am also open to critics if I am following the wrong way

rich vector
barren frost
paper shale
#

I dunno, I'd put it in it's own class and call it from a controller. That's the way I do it. But I also don't stick to a lot of conventions

#

Controller/class/model, it's all secure as long as you program it securely

barren frost
paper shale
#

If you're an intern, I'd suggest talking to someone in your company to see what their convention might be

#

They might have a preference

rich vector