Stripe is a payment gateway that is becoming increasingly popular in the Web industry. It offers payment processing services, which can be easily integrated into your Web application using the Stripe API.

Although it is not free (2.9% + 30 cents per transaction), Stripe saves time and reduces cost in many ways: seamless integration and good documentation reduces the amount of time and development hours needed, while it offers complete control over sensitive data which saves hundreds of thousands of dollars that would otherwise be spent on ensuring PCI compliance.

They then show how to set up and use the PHP Stripe API package to create a simple checkout form to accept credit card information and use the stripe.js handling to send it directly to Stripe. Once the service receives it, it then makes a call back to your callback endpoint to create a token value for the transaction and customer. This callback then uses the API to make the actual charge using the token for the payment method and the customer information.

On KodeInfo.com there's a new tutorial posted showing you how to let your users pay with Bitcoin made possible using Coinbase, a Bitcoin wallet service, and BitPay, a payment gateway. Their example is a Laravel-based application.

Today we will learn how to integrate payment with bitcoins , we will integrate coinbase and bitpay to pay with bitcoins .

They walk you through the full process, including getting the accounts set up on the needed services:

Setting up Bitpay

Setting up Coinbase

Creating migrations

Views and Routes

Config File

Creating models

Integrating Bitpay

Integrating Coinbase

Each step is accompanied by screenshots or code, depending on what steps are needed. If you want to jump to the end, you can also grab the full code directly from GitHub.

While design patterns are a wider topic than just PHP, the NetTuts.com site has posted a new tutorial looking at the Repository Pattern and uses PHP and PHPUnit to illustrate how the pattern works. They looks at the structure of the pattern at a high level and provide a more "real world" example too.

The Repository Design Pattern, defined by Eric Evens in his Domain Driven Design book, is one of the most useful and most widely applicable design patterns ever invented. Any application has to work with persistence and with some kind of list of items. These can be users, products, networks, disks, or whatever your application is about. If you have a blog for example, you have to deal with lists of blog posts and lists of comments. The problem that all of these list management logics have in common is how to connect business logic, factories and persistence.

They start with an overview of the pattern and some of the problems that it can help to solve. They also briefly mention the Gateway pattern that will be used in the examples to pull information into the Repository. After covering some of the basic concepts, they get into the code (going the TDD route) showing how to manage comments, like from a blog, inside a repository. It implements a "Comment" class, a persistence mechanism (the Gateway) and a Factory class that takes in the comment data and returns a correctly formatted object. Finally, they make the repository class and show how to add and retrieve comments from its internal data set.

In this, the second episode of PHP Cloud Development Casts, we go through how to creating charges with the Stripe.com libraries. We use a simple Kohana based PHP setup to create a token and an accompanying charge. We then login to our account and look at the details that Stripe stores about the transaction from tokens, charges, events and other logged data.

You can view the video either on their site or by heading to Vimeo for a bit larger version. He shows how to use Stripe's own Javascript and PHP scripts to connect to the API. He does it as a part of a Kohana-based application, but it can be easily adapted to any framework (or non-framework) site out there.

On the Ibuildings techPortal today there's a new post from Robert Raszczynski about domain modeling and how a good knowledge of it can help your application's architecture.

Architectural and design patterns help software architects to break systems in to smaller, more maintainable sections organised by their functionality and usage. [...] There are three major layers in software architecture: presentation, domain and data source. [...] Now that we know what types of layers we can find in software architecture, let's have a look at how we can organize domain logic and data sources layers.

He looks at three patterns that can help organize your domain logic - a transactional script (one file that does one thing), a table module (logic lives in the tables) and his focus, the domain model. He shows (via a graph) how the domain logic approach can cut through some of the effort it could take to improve on the other two. He gives a two suggestions of how to access the data in your domain layer - a Gateway or a Data Mapper. To reinforce the ideas he's presented, he includes some code snippets of a basic domain model for a Store, Customer and Product and uses them in both Gateway and Data Mapper examples.

PayPal has a huge API reference to integrate it's services into any website. But from personal experience I found that the theory is far more simple than the practice. There are various methods to implement PayPal's services including Soap webservices with 'Express Checkout' and 'Website Payment Pro'. This tutorial will focus on 'Website Payment Pro' and the 'IPN' event listener.

He shows how to send the information as a POST request in one of two ways - as a standard form submission kind of POST and from a script opening a direct socket to the PayPal server and sending over a well-formed request.

Generally, folks choose to deploy web-based applications on Windows Server because they already have Windows Server. Selling them something that will only work on Linux is a tough sell, so a competition like this that seeks to show off how well PHP works on Windows should be another small step forward for all those small ISVs like Box UK who want to sell products written in PHP - provided Microsoft actually do something marketing-wise with the results.

His idea is to build a PHP/.NET tool that can act as a web services gateway. He's already started development and blogs about getting the environment all set up - Windows Server 2008, IIS7 and PHP 5.2.9 For Windows.

He's made another post with an update on his status - finishing out the development environment with PHP up and running, setting up a database, picking an IDE (Visual Studio) and setting up a version control system (git).

In this post he takes about what he's trying to achieve with his application and some use case examples and in this other post some of the feedback he's gotten about his dev environment.

In my situation, PayPal is only used to pay for orders - cart and order setup is done in our shop, so I do not want to have additional problems with users changing orders numbers, amount to be paid, etc. [...] Only PayPal knows how to decrypt it, because it uses public key encryption technology (you need to upload your certificate in PayPal account).

Some sample usage code is included as is a link to the class itself. His example takes a payment transaction including the item name, amount and currency type and sends it off to the PayPal servers in a connection protected by certificates.

Attila Szabo has come up with a class that makes sending SMS messages from your site simple (through the smsBug gateway).

I wrote a simple PHP class for sending SMS messages through smsBug gateway. It can send a single SMS message and receive the number of credits left (see the UML diagram of the classes below). You need to include two classes into your PHP code.

He includes an example of it in use (sending a single SMS message to a phone) as well as a demo of it in action and a link to the download where you can grab the class for yourself.

From this post on Ajaxian.com today, there's a look at a new PHP-based library/framework to help with Flash remoting - AMFPHP.

MFPHP is an open-source implementation of the Flash Remoting framework. Itâ€™s fast, reliable, 100% free and open-source. With this new version we have strived to make a product as stable and full-featured as ColdFusion-based remoting (the reference implementation).

You also get to use the wonderful NetConnection debugger, which shows you exactly what's being sent between the client and server. Remoting uses AMF, a very lightweight binary format that cuts the bulk out of packets, meaning data exchange is a lot faster than with XML.