Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Julio Salvat
PLUS
Julio Salvat
Courses Plus Student 3,314 Points

Building a Shopping cart

I was wondering if anyone had some advice in building a shopping cart that would tie in a merchant account and be able to pay with your credit card or paypal account options. The purchase would go to a merchant account and not a paypal account.

6 Answers

Randy Hoyt
STAFF
Randy Hoyt
Treehouse Guest Teacher

That's a great way to do it. You'll want to use a merchant account that has an API you can integrate with so that people don't have to leave your site to complete the transaction. I recommend logging details about every request to the API so you'll have them if something goes wrong, but be sure not to log credit card numbers or other sensitive information in that log.

Julio Salvat
PLUS
Julio Salvat
Courses Plus Student 3,314 Points

Thanks for the response man! Do you have any documentation or a tutorial that I can go through to accomplish this?

Randy Hoyt
STAFF
Randy Hoyt
Treehouse Guest Teacher

The merchant should be able to provide you documentation for how to interact with their API. What merchant are you using?

Julio Salvat
PLUS
Julio Salvat
Courses Plus Student 3,314 Points

My Client is using Network Merchant INC https://www.nmi.com/

I am just not sure where to start I can build the whole site with no issues. I am front-dev / designer with limited php knowledge. Any help would be much appreciated thanks in advance.

Randy Hoyt
STAFF
Randy Hoyt
Treehouse Guest Teacher

I would probably recommend against trying to code an integration with a third-party API to process credit card transactions for an ecommerce website to someone with limited server-side programming experience. It's just not a simple task. If you have to code it, I would get in touch with the merchant and see what kind of documentation and suggestions they can give you. They may have a library already written that you can use to handle the integration.