Archives For PHP

Handling Stripe Errors

January 30, 2013
This entry is part 7 of 8 in the series Processing Payments with Stripe

If you’ve sequentially followed this series on implementing payments with Stripe, you now know everything you need to be processing payments with Stripe today. In theory. This series, the six posts to this point, has already walked through all of the code needed for the system to work, assuming everything does work. Which is to say I have yet to explain how to watch for and handle the errors and problems that will inevitably occur. That’s the focus in this post.

Note that this article assumes that you have read the previous articles and are comfortable with PHP.

Continue Reading...
This entry is part 6 of 8 in the series Processing Payments with Stripe

In an earlier post in this series, I covered how you create an HTML form for securely handling payments via Stripe. In the previous post, I walked through the JavaScript that goes with that form. As explained in that post, thanks to the Stripe.js library, the proper HTML, and a bit of JavaScript, you can easily and securely handle payments on your site without getting mired in the PCI compliance muck. The secret is the Stripe.js library: it sends the customer’s payment information from the client to Stripe’s server and returns a token that Stripe associated with that payment information. Then, when the form is submitted, the token can be used by the PHP on your site to actually process the payment. The customer’s payment information, however, never touches your server. You get paid and the customer is protected.

In this post, I’ll walk through the necessary PHP code that actually processes the payment request. Note that this article assumes that you have read the previous articles and are comfortable with PHP.

Continue Reading...

So it’s 2013! I thought an update on “The Yii Book” would be a good way to start off the year. As you may know, I am behind schedule on the book, but this is apparently how I write books (i.e., always behind schedule). Not that it makes it right. Anyway…

Continue Reading...

An article, titled “Social Media Authentication and Authorization Using PHP“, which I recently wrote for Peachpit Press has been posted online. In the article, I explain how to use the HybridAuth library to perform authentication and authorization against common social media sites. I specifically demonstrate the code for interacting with Twitter, but the library works for other sites too.

This is the fourth article I wrote in support of my “PHP Advanced and Object-Oriented Programming” book.

In conjunction with my “How to Become a Web Developer” presentation, given to the Boston PHP user group on December 12, 2012, I’ve composed this page of Web developer resources. Such lists can quickly become overwhelming, and therefore less useful, so in compiling it, I’ve tried to stick to resources that meet at least one of the following criteria:

– Are de facto standard resources
– Contain information not found elsewhere or not explained as well elsewhere
– Present a unique perspective

So while the Web is happily overrun with useful resources, those listed here are ones I considerable most notable. If you have your own recommendations, please post those as comments!

Continue Reading...