Open gerfigna opened 8 years ago
I've added PR for this. #14 Once it is approved, you will be able to handle webhooks in this way:
# Handle webhooks
$webhook = $chargify->webhook()->handle('webhook.log');
if($webhook) {
echo $webhook->getEvent() . PHP_EOL; // payment_success
echo $webhook->getId() . PHP_EOL; // 112233
print_r($webhook->getPayload()); // Array
}
// Generate fake webhook for testing
$webhook = $chargify->webhook()->handleFake();
I want to handle webhooks using this library.
Can you show me any code sample?
Thanks !