I would like to integerate stripe payment gateway in codeigniter. I previously uses core php library of stripe and it works fine but in codeigniter how i integerate it in codeigniter.
my files are like below : view:
<?php //echo form_open('vendor/stripe_charge'); ?>
<input type="text" name="data-key" value="<?php echo "pk_test_lWC3x0aqak9UBnQy6JnRTGOL";//echo $config['publishable_key']; ?>"/>
<input type="text" name="data-amount" value="5000"/>
<input type="text" name="data-description" value="Paying your bill"/>
<input type="text" name="data-name" value="Yummylicious"/>
<input type="text" name="data-image" value="http://interiorlounge.com.pk/wp-content/uploads/2013/04/logo_huawei_128x128.jpg"/>
<input type="text" name="data-label" value="Pay Your Bill"/>
<input type="submit" value="Pay Your Bill"/>
<!--
// optional parameters in javascript
data-shipping-address="true"
data-billing-address="true" -->
<?php echo form_close(); ?>
"/>
controller :
public function stripe_charge(){
echo "stripe function working"."<br>";
echo $this->input->post('amount');
Stripe::setApiKey("sk_test_yDE2WSUQ3wexrlhqO01PeANe");
}
and error occurs : stripe function working Fatal error: Class 'Stripe' not found in D:\xamp\htdocs\halal_lte\application\controllers\vendor.php on line 578