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

Posted on 2014-07-10
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 ( 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
    LVL 82

    Expert Comment

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

    Accepted Solution

    It looks simple at least.  They even have a simple sample app using bootstrap or an even simpler sample using php and a list of simple samples

    If  you are not sure what you are doing I would try and  use a buy now button from pay pal 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

    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: , 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.

    LVL 52

    Expert Comment

    by:Scott Fell, EE MVE
    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?

    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 82

    Expert Comment

    by:Dave Baldwin
    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

    OK thank you Scott.


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Are you using email marketing software? If not, you're missing out on effortless marketing and the reaching of desired conversion rates through email marketing software.
    For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
    Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
    Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

    734 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now