Php codeigniter中的条带支付网关集成未连接

Php codeigniter中的条带支付网关集成未连接,php,codeigniter,stripe-payments,Php,Codeigniter,Stripe Payments,我在Codeigniter项目中集成了一个条带支付网关。付款时会重定向到成功页面,但未从我的卡中检测到金额,也未在我的stripe dashboard中列出,请帮助我 条带控制器 public function stripePost() { require_once('application/libraries/stripe-php/init.php'); \Stripe\Stripe::setApiKey($this->config->item('stripe_

我在Codeigniter项目中集成了一个条带支付网关。付款时会重定向到成功页面,但未从我的卡中检测到金额,也未在我的stripe dashboard中列出,请帮助我

条带控制器

 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');
}
我将密钥存储在config.php中

$config['stripe_key'] = '********************************';

$config['stripe_secret'] = '****************************';

请帮忙。提前感谢

您应该使用测试API密钥,而不是实时密钥。假设您正在使用API密钥,并且没有错误,则应在您的条带帐户中创建费用。

如何确定费用是否成功?您需要检查尝试充电时抛出的错误条带,以了解幕后发生的情况。阅读他们的API文档。(索引):3 POST 400…在提交付款时出现此错误。您应该查看您的Stripe仪表板以了解该请求,并查看问题所在。