I integrate a stripe payment gateway in my Codeigniter project. While payment it redirects to the success page but the amount was not detected from my card and not listed in my stripe dashboard, please help me.
stripecontroller
public function stripePost()
{
require_once('application/libraries/stripe-php/init.php');
\Stripe\Stripe::setApiKey($this->config->item('stripe_secret'));
\Stripe\Charge::create ([
"amount" => $this->input->post('amount'),
"currency" => "usd",
"source" => $this->input->post('stripeToken'),
"description" => "Test payment gateway integration."
]);
$this->session->set_flashdata('success', 'Payment made successfully.');
redirect('/payment/method', 'refresh');
}
I stored my key in config.php
$config['stripe_key'] = '********************************';
$config['stripe_secret'] = '****************************';
Please help. Thanks in advance