PHPDeveloper.orghttp://www.phpdeveloper.org
Up-to-the Minute PHP News, views and communityen-usTue, 03 Mar 2015 14:34:48 -060030http://www.phpdeveloper.org/news/22263http://www.phpdeveloper.org/news/22263
NetTuts.com has continued their series showing how to integrate a custom payment method into your OpenCart instance with part three of the series. In this tutorial they focus more on the frontend aspects, creating controller and model handling for the new method.

If you've been following along with this series, you should be familiar with the kind of file structure we set up for our custom payment method in the back-end. [...] We'll use a similar kind of file setup for the front-end section as well.

He starts with the controller, building a handler for the Custom method, doing some data filtering and getting the order information. He walks you through what each of the lines are doing and shows how to output the result back to a view. He also includes the model code needed for the custom payment method as well as language/template files to display the form needed to gather the necessary data.

Link: http://code.tutsplus.com/tutorials/create-a-custom-payment-method-in-opencart-part-3--cms-22464]]>Wed, 21 Jan 2015 10:20:44 -0600http://www.phpdeveloper.org/news/22116http://www.phpdeveloper.org/news/22116
On the NetTuts.com site today they've posted the first part of a series showing the integration of the BitPay bitcoin payment service into an OpenCart instance. In this first part they focus on getting some of the initial setup and administration handling set up.

In this series, we are going to look at building a Bitcoin payment system into our installation of OpenCart. Before we get started, I recommend that you practice the basic OpenCart module development if you are not familiar with how to build your own modules. Once done, you should have enough knowledge to continue with developing more advanced modules. In this series, that's exactly what we aim to do.

They start by having you download the BitPay API library and dropping it into the root directory of your OpenCart installation. Next they show you how to create an "Admin" controller with the data you'll need to pass into the view including data pulled from a model. They also create the admin view showing the current orders using bitcoin as payment, their status and options to change the speed of the API requests, status and toggling test mode on and off. Finally they include the code to save the results of the admin form submission and a bit of validation around user permissions and API key validity.

Link: http://code.tutsplus.com/articles/integrate-bitcoin-payment-gateway-into-opencart-part-1--cms-22328]]>Wed, 17 Dec 2014 10:46:50 -0600http://www.phpdeveloper.org/news/22091http://www.phpdeveloper.org/news/22091
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.

Link: http://kodeinfo.com/post/pay-with-bitcoin-using-coinbase-and-bitpay]]>Thu, 11 Dec 2014 10:29:09 -0600http://www.phpdeveloper.org/news/20296http://www.phpdeveloper.org/news/20296
On the SitePoint PHP blog there's a new tutorial posted showing you how to integrate Laravel and Stripe to make a simple system for selling downloads of software. Stripe is a developer friendly, easy to use payment system that helps you take and manage payments.

Digital goods are an increasingly valuable commodity. [...] In this article I'll show how you can implement a simple store selling digital goods using PHP along with Stripe, a payment provider who aims to make it easier than ever to take online payments since you don't need to set up special merchant accounts or deal with complex payment gateways.

He points you to the Stripe site to set up an account before getting started. With that in hand, They start in on the Laravel setup and project creation. He helps you make a "downloads" table to handle path to the file and price. Also included are the model for the Downloads and a "seeder" with some fixture data to work with. From there he shows how to make a simple home page and a "buy" page with a form for the payment information. The Stripe javascript library is then integrated and the response is handled. If it's a success, the user is then forwarded to another endpoint to download the file they paid for.

Link: http://www.sitepoint.com/selling-downloads-stripe-laravel/]]>Thu, 24 Oct 2013 12:17:30 -0500http://www.phpdeveloper.org/news/20190http://www.phpdeveloper.org/news/20190
The SitePoint PHP blog has posted the second part of their series about making a subscription -based website with Laravel and Recurly (part one is here). Improving on the code from the previous part of the series, they create the interface with Recurly.

In the first part of this series we created the bare bones of a subscription-based website using Laravel. We also set the site up with roles, and granted a pending role to new users. We're now at the point where we can perform basic registration, login, and logout. In this second part, we'll integrate Recurly to set up our paid membership plans.

Using the Recurly javascript library and the PHP packages installed in the first part of the series, they show you how to set up the API and configure the script to connect with your account. They integrate this with the signup process and include the PHP (Laravel) code to handle the registration and the Javascript to make the Recurly call. There's also some code creating some of the management pages letting users update things like plan choice and billing information.

Link: http://www.sitepoint.com/creating-subscription-based-website-laravel-recurly-2/]]>Tue, 01 Oct 2013 12:52:30 -0500http://www.phpdeveloper.org/news/20002http://www.phpdeveloper.org/news/20002
On NetTuts.com there's a new tutorial that shows you how to integrate an up and coming payment method into your site's flow - Bitcoin. The tutorial uses a combination of Javascript and a PHP backend and BIPS as the payment processor.

Bitcoin has definitely started to become more mainstream, and with its global reach and minimal fees, it is a payment method worth considering. In this article, we will take a look at what Bitcoin is, as well as how to start accepting them in your applications. [...] I'm not going to get into the specifics, but essentially each time a transfer of currency takes place, the money is signed with the two parties keys and then hashed, and these transactions are appended to the global log. This allows coins to be publicly traced back, and to see if the money really belongs to someone or not.

He starts off explaining what the whole bitcoin system is based on and some of the common advantages and disadvantages around it. He then gets into the actual application, creating a simple structure using the Slim microframework and a bit of HTML to make a simple payment site. The BIPS processor is used to handle the payment and the Mandrill service to send the confirmation emails. Curl requests are used to call the services, so you'll need it installed as a PHP extension to make their examples work.

Link: http://net.tutsplus.com/tutorials/javascript-ajax/adding-bitcoin-payment-processing-to-your-website]]>Mon, 19 Aug 2013 12:38:53 -0500http://www.phpdeveloper.org/news/19285http://www.phpdeveloper.org/news/19285
On PHPMaster.com today there's a new tutorial that talks about PCI compliance with PHP applications and some of the technology you can use to help conform to its requirements.

In reality, PCI is a set of security guidelines drawn up by a consortium of credit card companies and industry security experts to govern how applications should behave when handling credit or debit card information. The card companies impose these standards on the banks who then impose them on those of us who operate e-commerce sites and the like. In this article we will dispel a couple of persistent myths about PCI, take a 20,000-foot look at what PCI encompasses, and then zero in on those requirements that are most closely associated with coding in general and PHP specifically.

He starts with some common myths about PCI (Payment Card Industry) compliance, including that it only applies to "the big guys" taking payments on the web. He then goes through some of the major points of the PCI requirements and talks about a few of them that specifically relate to the backend code side of things.

]]>Thu, 07 Mar 2013 11:08:11 -0600http://www.phpdeveloper.org/news/18880http://www.phpdeveloper.org/news/18880
On the Symfony blog, there's two new posts highlighting some recent improvements to the Symfony2 framework - the addition of static page caching and payment validators:

These features are all a part of the upcoming Symfony 2.2 release that's planned to be moved in the "stabilization" status in early 2013. It should be able two months following that when the stable version will be released.

]]>Wed, 12 Dec 2012 11:46:39 -0600http://www.phpdeveloper.org/news/18669http://www.phpdeveloper.org/news/18669
The PHP Cloud Casts site has posted another screencast-based tutorial showing you how to interface your application with Stripe.com, a developer-friendly payment solution with its own API.

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.

]]>Mon, 29 Oct 2012 10:05:06 -0500http://www.phpdeveloper.org/news/18557http://www.phpdeveloper.org/news/18557
On NetTuts.com there's a tutorial showing you how to use the GoCardless service to accept payments on your site (in the UK, unlike some other online payment services).

Online payments are increasingly becoming more and more popular. GoCardless is yet another payment service, which currently works in the UK, allowing you to accept payments online.

Most of the tutorial is used to explain what the service is, getting you set up with an account (complete with screenshots) and how you can work with their API via an SSL connection. Included are examples of this using their PHP Library and what the results look like in their interface.