I have a problem using the stripe. When I create an invoice I also save the invoice_id
to the MySQL database so i could reference it to retrieve that specific invoice details but it doesn't work. What am I doing wrong here?
\Stripe\Stripe::setApiKey('my-test-key');
$invoice = \Stripe\Invoice::retrieve(
$invoice_id
);
$invoice_amount = $invoice->total;
This should return the invoice total if I am not mistaken? Or should I just save everything to the database to the invoices table when creating the invoice and then get the data from the that table?