News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

AWS PHP Development:
Testing Webhooks Locally for Amazon SNS
April 08, 2014 @ 11:33:07

In a previous post the AWS for PHP blog showed how to set up webhooks for handling the callbacks from their SNS messaging service. In this next part of the series they continue the process, showing how you can test these hooks locally without needing to actually send the messages. This eliminates the need to deploy to a public-facing server just to test the hooks every time you need an update.

In a recent post, I talked about Receiving Amazon SNS Messages in PHP. I showed you how to use the SNS Message and MessageValidator classes in the AWS SDK for PHP to handle incoming SNS messages. The PHP code for the webhook is easy to write, but can be difficult to test properly, since it must be deployed to a server in order to be accessible to Amazon SNS. I'll show you how you can actually test your code locally with the help of a few simple tools.

Using PHP's own built-in webserver and a tool called ngrok to tunnel from the public internet to a local server. He includes the commands to set up the PHP script directory, the code to intercept the POSTed data from the request, validate it and send the subscription confirmation request. He helps you create an SNS "topic" through the management console and walks you through a sample test request while tailing the logs.

0 comments voice your opinion now!
aws amazon sns webhook testing local server ngrok tutorial

Link: http://blogs.aws.amazon.com/php/post/Tx2CO24DVG9CAK0/Testing-Webhooks-Locally-for-Amazon-SNS

AWS PHP Development:
Receiving Amazon SNS Messages in PHP
April 01, 2014 @ 10:53:14

The Amazon Web Services PHP Development blog has a new post from Jeremy Lindblom showing you how you can receive inbound SNS messages via a webhook on your application.

Amazon Simple Notification Service (Amazon SNS) is a fast, fully-managed, push messaging service. Amazon SNS can deliver messages to email, mobile devices, Amazon SQS queues, and HTTP/HTTPS endpoints. [...] Though you can certainly subscribe your email address to receive SNS messages from service events like these, your inbox would fill up rather quickly. There is great power, however, in being able to subscribe an HTTP/HTTPS endpoint to receive the messages. This allows you to program webhooks for your applications to easily respond to various events.

Using the AWS SDK for PHP you can set up a listening script that can receive the message and handle subscription confirmations, message signature validation and handling the notifications.

0 comments voice your opinion now!
amazon aws sns message receive webhook sdk

Link: http://blogs.aws.amazon.com/php/post/Tx2G9D94IE6KPAY/Receiving-Amazon-SNS-Messages-in-PHP

PHP/Cloudcast:
Getting Started with Stripe Webhooks
November 19, 2012 @ 09:20:51

On the PHP/Cloudcast site today they've released another screencast showing you how to integrate your application with Stripe, the popular (and programmer friendly) payment gateway for your applications. This is the third part of their series.

In this, the third episode of PHP Cloud Development Casts, we go through how to integrate Stripe Webhooks in to our PHP applications. We extend the PHP Kohana application we created in episode 2 and show how simple it is to create a webhook and to receive the information and store it in a MySQL database.

Through the use of Stripe's webhooks, you can have a transaction call back to your application on a specified URL and perform further actions. In his example, he shows how to make the request, handling the "payment success" event. He includes all of the code (controller, view, etc) that you'll need to plug into Kohana to make it all work.

0 comments voice your opinion now!
cloudcast screencast stripe tutorial callback webhook kohana



Community Events





Don't see your event here?
Let us know!


series library community security opinion update symfony package voicesoftheelephpant version laravel introduction composer language release framework tool interview podcast install

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework