Why i got Customer id and invoice id cus_0000000000000 and in_0000000000000 like these? in stripe webhook response. I am checking my events and response in my account in this i got response 200 ok,but got customer id and invoice id got like these.why? i am checking send test webhook event at this i got response like these.
public function actionStripeHook() {
if (Yii::app()->request->isPostRequest) {
try {
$postdata = file_get_contents("php://input");
$event = json_decode($postdata);
switch ($event->type) {
case 'invoice.payment_succeeded':
Yii::log('', 'trace', 'stripe');
Yii::log('==================================', 'trace', 'stripe');
Yii::log('==== Event (' . $event->type . ') ====', 'trace', 'stripe');
Yii::log('==================================', 'trace', 'stripe');
$customer_id = $event->data->object->customer;
$customer = Stripe_Customer::retrieve($customer_id);
$invoice = Stripe_Invoice::retrieve($event->data->object->id);
}
What's Wrong in my code Its my action in Webhook endpoint in stripe,I got event type invoice.payment_succeeeed its coming from that case,but cant get customer id and invoice id correctly in my Response.why?