// Handle the event | // Handle the event | ||||
switch ($event->type) { | switch ($event->type) { | ||||
case 'payment_intent.succeeded': | |||||
case 'charge.succeeded': | |||||
$paymentIntent = $event->data->object; | $paymentIntent = $event->data->object; | ||||
$creditHistory = new CreditHistory; | $creditHistory = new CreditHistory; |