• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Debugging Stripe Webhook Event

phpstripe-paymentswebhooks


PHP Snippet 1:

<?php
// Retrieve the request's body and parse it as JSON:
$input = @file_get_contents('php://input');
$event = json_decode($input);

http_response_code(200); // PHP 5.4 or greater

// echo the event id, evt_xxxyyyzzz
echo $event->id;

if($event->type == "charge.succeeded") {
   // you want the id of the charge rather than the event, ch_xxxyyzz
   echo $event->data->object->id;
}

?>

Related Snippets

Add a text next to stock quantity if it is less than 10 in Woocommerce single product

php echo remove slashes from url [duplicate]

PHPUnit (Phar) Fatal Error Only When Test Fails

Laravel 5.2: Unable to locate factory with name [default]

Navigation idle on content download

How to auto populate preferredCountries from intl-tel-input with db output

CodeIgniter 3 is generating a session file on each request, why?

How to get values inside <![CDATA[values]] > using php DOM?

sqlsrv_num_rows() expects parameter 1 to be resource, boolean given

Android Volley getParams() method not getting called for JsonObjectRequest

phpMyAdmin ERROR: mysqli_real_connect(): (HY000/1045): Access denied for user 'pma'@'localhost' (using password: NO)

target [LaravelFortifyContractsRegisterViewResponse] is not instantiable

PHP header location absolute URL

I want a way to give path to my files which are outside of public folder in laravel

Redis Command To Sort Keys

About Contact Privacy policy Terms and conditions