How to test Web Hooks in Development Cheddarplan
Hi,
I tried to test Web Hooks under Development Cheddarplan but didn't succeeded.
I have configure the Service Hooks -> Custom URL. Added "Desciroptoin Name", "URL" and checked out all of the Web Hooks types and "Active" check-box. Then I added a new customer, added a subscription, canceled subscription, deleted user but no Web Hooks were triggered?
In the Activity -> Hooked Events there are no entries only the "No Events Hooked" message!?
Please advise how to simulate Web Hooks from the Development Cheddarplan.
Bye, Marin
Discussions are closed to public comments.
If you need help with Cheddar please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Marc Guyer on 06 Jun, 2012 02:27 PM
Hi Marin -- I see a hook in your hooked events activity from just a few minutes ago. Are you still seeing a problem?
2 Posted by marin.purgar on 06 Jun, 2012 02:49 PM
Hi Marc,
yeah, I have figured it out, my development Pricing Plans were set to "bill 1 month after signup", after changing it to "bill immediately on signup" I got the "transaction" WebHook immediately after simulating preapproval via paypal.
But even with the "bill 1 month after signup" the new customer was created and there was no "newCustomer" Web Hook sent.
Also, please change the documentation at "Web Hooks, Service Hooks, and Captain Hooks" Knowledge base Article. There it is stated that Signature Verification Token is sent via X-CG-SIGNATURE HTTP header. By dumping all of the headers of the Web Hook request I found out that in fact the header in question is HTTP_X_CG_SIGNATURE.
Bye, Marin
Support Staff 3 Posted by Marc Guyer on 06 Jun, 2012 03:01 PM
Hi Marin -- We're looking into the missing newSubscription hook.
Regarding the header: I think your app may be adding the HTTP_ to the header names and converting dashes to underscores. I've never seen that before and it strikes me as odd. Here's the raw POST from our log:
Can you confirm?
4 Posted by marin.purgar on 06 Jun, 2012 03:13 PM
Hi Marc,
this is the excerpt from the $_SERVER variable dump (in PHP) of the headers received with the Web Hook HTTP Request:
Bye, Marin
Support Staff 5 Posted by Marc Guyer on 06 Jun, 2012 03:34 PM
Ah, I see. I had forgotten that PHP does that in the _SERVER super global. We're using PHP as well but we reference the headers via the ZF request object in our tests. Funny, ZF, converts it back:
Thanks for bringing that to our attention. I've updated the KB article accordingly.
Support Staff 6 Posted by Marc Guyer on 07 Jun, 2012 01:34 PM
Hi Marin -- We just released a hotfix to enable newSubscription hooks for PayPal subscriptions. FYI, we have a fork of our normal logic specifically for PayPal. Notably, the NewSubscription email is sent immediately when the PayPal process is begun. After the process is complete, the hook fires. Thanks for bringing this to our attention. Let us know if you have questions.
Marc Guyer closed this discussion on 04 Jul, 2012 02:11 PM.