application/libraries/Stripe.php
//create a product that represents the service you intend to offer to your customers for subscription 
create a product that represents the service you intend to offer to your customers for subscription
create a product that represents the service you intend to offer to your customers for subscription
function create_product($name, $type='service'){
        try{
            $product = \Stripe\Product::create([
                'name' => $name,
                'type' => $type,
            ]);
            if(empty($product))
                return array('status'=>false,'message'=>'Something went wrong');
            return array('status'=>true,'message'=>'Product created successfully', 'data'=>$product); 
        }catch(Exception $e){
            $message = $e->getMessage();
            return array('status'=>false,'message'=>$message);
        }
    }
function create_product ( $ name , $ type = 'service' ) { try { $ product = \ Stripe \ Product :: create ( [ 'name' => $ name , 'type' => $ type , ] ) ; if ( empty ( $ product ) ) return array ( 'status' => false , 'message' => 'Something went wrong' ) ; return array ( 'status' => true , 'message' => 'Product created successfully' , 'data' => $ product ) ; } catch ( Exception $ e ) { $ message = $ e -> getMessage ( ) ; return array ( 'status' => false , 'message' => $ message ) ; } }
create a product that represents the service you intend to offer to your customers for subscription
create a product that represents the service you intend to offer to your customers for subscription
//success