Welcome Guest, Not a member yet? Register   Sign In
payment modules how to process
#1

[eluser]egoslip[/eluser]
Hey there this is not a how to get paypal or auth.net working or something along those lines.

Now that I got that out the way.

Im new to CI but love it so far and everyone here has been great been reading the post and most of my questions have been answered. But after this extensive search i could not find the answer (or something simliar to it for me to work from )

I already have the payment modules working. but the process is hard coded.

What I want to do is have an item lets just say itm1 and I like to process that item with paypal. now I have a new item lets call it itm2 and i want to process payment with auth.net

and so forth and so on with any payment module I have.

so I want it to be modules for all the payment and dont want anything hard code in the checkout process for that module like.

item->process/checkout(here it would check what module to load)(if paypal: redirect to paypals site) (if auth.net: show cc_page)-> thank you page.

this is for single items and not for a full-out estore.

I Believe that to accomplish this it need to be a hook process.... from my very basic understanding of it....

so if you have or know of a tutorial on how to have this done or some type od sample code where this is working I can work from I would really appreciate it.
#2

[eluser]darkhouse[/eluser]
I think you might want to check out Modular Extensions. In your checkout controller you would know which payment module to load based on the item the user was purchasing, so you could load the appropriate module. Each module would be coded to do whatever you need, and of course you would need to write something receive a response from the payment gateway.

I have not used Modular Extensions (though I do have a plan for them in an upcoming project) but it sounds like that's your solution.

Let us know whatever you decide to do. I'm curious.




Theme © iAndrew 2016 - Forum software by © MyBB