Skip to content

Instantly share code, notes, and snippets.

@JeffreyWay
Created June 2, 2013 23:33
Show Gist options
  • Star 15 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JeffreyWay/5695346 to your computer and use it in GitHub Desktop.
Save JeffreyWay/5695346 to your computer and use it in GitHub Desktop.
And we wonder why we get overwhelmed.
So you want to accept payments online with PHP?
- Well, you probably don't want to handle that process manually. Too dangerous and risky.
- So learn the Stripe API. Works great!
- But you'll still need to setup SSL. So go learn how to do that.
- Stripe provides a PHP package, so download that through Composer. If you're not familiar with Composer, you'll need to learn that too.
- If you want the most flexibility, you'll want to manually create the payment form.
- So you'll need to send an AJAX request with a special token to Stripe's API. jQuery makes this easy, so go learn jQuery.
- Once the payment completes, you'll likely want to send the buyer a "Purchased" email, so learn how to send email.
- But don't make the user wait for the email to send. That takes too long. Add that to a background job.
- If you want to use queues, then you'll need to learn how to use a service, like Iron.io.
- Unless you want to do all of this with raw PHP, learn how to use a framework, like Laravel.
- Finally, once you have everything working, are you sure that you're following the separation of concerns pattern? Go refactor. Don't know how? Well watch countless presentations, and learn how.
...And we wonder why we get overwhelmed.
@PendragonDevelopment
Copy link

Just a heads up, they just recently added purchase emails: https://stripe.com/blog/email-receipts

But I definitely understand what you mean :)

@clarkeash
Copy link

Thats a great example, i guess most of us get annoyed that we can't build what we want at the moment in time but the only thing we can do is strive to build our skills one at a time :)

@dexbarrett
Copy link

And yet some people think online payment integration is dead easy. Mostly non-devs, of course.

@rick4470
Copy link

rick4470 commented Jun 2, 2013

Hey that does not seem that bad!

@rncrtr
Copy link

rncrtr commented Jun 3, 2013

{{#sarcasm}}All in a day's work, right? I mean, all the "real devs" just know this stuff from birth. They are born with a silver IDE in their hand. Get on it newbs.{{/sarcasm}} I am always looking for good ways to share knowledge with our team at work and other programmers too, b/c this stuff is complex and involved. Anyone who does this should not have to endure the pain alone, or at least undocumented by a programmer, NOT by the "this should work" people who built it necessarily. In the lab and in the field are very different things. I feel like it is a personal duty to leave a trail that is easy to follow for anyone else having to wade through the mud I've had to. Dev is a rodeo seldom wrangled alone. Now everyone sing coom bah yaaaaaaaaaaa and hold hands. Gone are the days of "I'm a BLANK programmer." Now, you do it all, and learn it all, even if you didn't know it 5 minutes ago. Crazy times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment