Welcome Guest, Not a member yet? Register   Sign In
How to load config options into library from model. in Ci4.5
#1

(This post was last modified: 05-30-2024, 06:59 AM by xsPurX.)

I have this from ci2.2 I want to know how I can do this in CI4.5
PHP Code:
        $config = array(
            
'Sandbox' => FALSE
            
'APIUsername' => $pp_username,
            
'APIPassword' => $pp_password
            
'APISignature' => $pp_signature
            
'APISubject' => '',     
            
'APIVersion' => $this->config->item('APIVersion')
        );
        
$this->load->library('paypal/Paypal_pro'$config); 

Thanks
Reply
#2

This works, didn't think it would be that easy for some reason lol.

PHP Code:
$config = array(
            
'Sandbox' => FALSE,     
            
'APIUsername' => $pp_username,
            
'APIPassword' => $pp_password,
            
'APISignature' => $pp_signature
            
'APISubject' => '',
            
'APIVersion' => config('Paypal')->APIVersion
        
);
        
$this->Paypal_pro = new Paypal_pro($config); 
Reply




Theme © iAndrew 2016 - Forum software by © MyBB