jjaffeux / postmark-inbound-php

Simple API wrapper for Postmark Inbound Hook
http://developer.postmarkapp.com/developer-inbound.html
MIT License
97 stars 20 forks source link

How do I use this in a controller? #4

Closed priyolahiri closed 12 years ago

priyolahiri commented 12 years ago

How do I use this in a controller with my framework?

$inbound = new \Postmark\Inbound(what goes here?)

priyolahiri commented 12 years ago

Also, is the request from Postmark to the webhook a POST or a GET?

jjaffeux commented 12 years ago

AS said in the doc :

$inbound = new \Postmark\Inbound(file_get_contents('php://input'));

look at the php doc to understand what file_get_contents('php://input')) does.

And yes the postmark request is a GET.

priyolahiri commented 12 years ago

sorry about that. I had used new \Postmark\Inbound(file_get_contents('php://input')); but was getting nothing. Then I realised that dns for my dev domain was pointing to the wrong server. My bad.

jjaffeux commented 12 years ago

No problem.