[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Trying to implement "Stripe" payment-processing system in PHP

Posted on 2014-07-10
Medium Priority
Last Modified: 2016-03-20
Hello, I'm not sure I have the right category but here goes: I'm trying to integrate the "Stripe" payment processing platform (www.stripe.com) into my website in the most simple plain-vanilla way. I just need a simple "Buy" button on my site for customers to click on and submit their CC info. Stripe has some basic documentation on how to do this at:


But still, they assume the user is proficient at a web programming language (ie. PHP, Python, Perl, etc)... of which I am not. I know a little HTML, so I'm not completely useless, but nothing as far as PHP and such. As I communicated with Stripe support regarding this, they wouldn't offer much help and recommended I hire a programmer to do this. I really didn't think that was necessary as I only want to do a very very simple implementation of their system. If you look at the doc page I mentioned above, that part # 1 is certainly no problem. The part I get bogged down at is the next step:


Here they give code samples in 4 languages (my web host uses PHP). My question is - *where* do I put this code sample on my web host? What filename do I give this, and what directory do I put the file in? That's really (I think...) all I need to know. Can someone help me with this?

Question by:shawn857
  • 2
  • 2
  • 2
LVL 84

Expert Comment

by:Dave Baldwin
ID: 40189295
I recommend you hire a programmer.  It is not as easy as you want it to be.
LVL 54

Accepted Solution

Scott Fell,  EE MVE earned 2000 total points
ID: 40189737
It looks simple at least.  They even have a simple sample app using bootstrap https://github.com/myg0v/Simple-Bootstrap-Stripe-Payment-Form or an even simpler sample using php https://gist.github.com/boucher/1750375 and a list of simple samples https://stripe.com/docs/examples

If  you are not sure what you are doing I would try and  use a buy now button from pay pal https://www.paypal.com/us/cgi-bin/webscr?cmd=_singleitem-intro-outside. They will give you html to copy and paste.  You will generate the button html on their site so things like price can't be tampered with.

There are a lot of gotcha's in making a payment system and you can be in for trouble if you don't understand this.  So stick with paypal or hire somebody.

Author Comment

ID: 40189761
Thanks Scott, it just puzzles me why there can't be a straightforward basic template for the plain vanilla "Buy" button, where I just just drop in my particular passkeys and be done with it. I don't get why there has to be so much custom work just to do the most basic of Stripe setups.
   I did look over some of those examples - they make me scratch my head:

(1) I don't know what "bootstrap" is.
(2) In this one: https://gist.github.com/boucher/1750375 , I don't understand why there is both PHP and HTML in the same file.
(3) Larry Ullman's sample looks like you need to re-invent the wheel.
(4) I don't need to create my own elaborate "custom" checkout form... just the default one is fine.

I've already used Paypal before and I'm just not fond of them... that's why I was looking for another solution.


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 40189802
Shawn, when google became in vogue, I can't tell you how many people asked if I could make them a simple site just like google.  You know, a simple 2 page site with a simple text box and submit button on page one.  Then the 2nd page just print out the results.  How hard can that be?

This is really the same type of thing.  

The samples shown are all very straight forward.  If you are having a hard time with those, then this is not the solution for you.

There are different methods of accepting payments.  One option is to forward the user to the processors site (like you might find with paypal).  Another option is to keep the user on your site for the cart, but when they enter their card data, you post to the gateway, then set up a listener and process from that page.  Those last 2 ways can be more complex as far as being seamless, but are easier for pci compliance.   Allowing credit card data to be posted to your own server requires pci compliance and quarterly scans.  It opens you up to greater risk but can give the most seamless interaction for the user.  

Have you looked into what you need to be prepared for as far as pci?  https://www.pcisecuritystandards.org/

All I can tell you is those samples are all straight forward.  You can start with a test account and add your test credentials and see what happens.   You really should hire somebody for this.
LVL 84

Expert Comment

by:Dave Baldwin
ID: 40189810
For what it's worth, a Paypl shopping cart took 6 pages to implement, 3 of them hidden from the user.  Paypal buttons are fairly easy to use but most other payment sites don't do that.

Author Closing Comment

ID: 40200359
OK thank you Scott.


Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question