CoinpaymentsAPI |
hello . I am presenting a problem since when activating a Coinpayment library I am carrying out the process but it throws me error # 64 I am using it with the manual but it throws me the same error
PHP Code: <?php Cannot declare class CoinpaymentsAPI, because the name is already in use APPPATH\Libraries\coinpayments\src\CoinpaymentsAPI.php at line 23 Code: 16 * PHP Code: use App\Libraries\coinpayments\src\CoinpaymentsAPI; It looks like you are using an official API wrapper. You need to use loading via classmap. PHP Code: public $classmap = [ PHP Code: use CoinpaymentsAPI; (01-12-2022, 12:24 AM)iRedds Wrote:Thanks for the answer that was the only thing I was missing the classmap (01-12-2022, 12:24 AM)iRedds Wrote: question to upload to localhost works without problem but when uploading from a server it throws an error Class 'CoinpaymentsAPN' not found public $classmap = [ 'CoinpaymentsAPN' => APPPATH .'Libraries\coinpayments\src\CoinpaymentsAPI.php' ]; <?php namespace App\Controllers; use App\Controllers\BaseController; use CoinpaymentsAPN; Error Class 'Coinpaymentsapn' not found APPPATH/Controllers/Dashboard.php at line 300 Code: 300 $cps_api = new Coinpaymentsapn($private_key, $public_key, 'json'); (02-08-2022, 08:08 PM)iRedds Wrote: Coinpaymentsapn !== CoinpaymentsAPN !== CoinpaymentsAPII already changed it to public $classmap = [ 'Coinpayments' => APPPATH .'Libraries\coinpayments\src\Coinpayments.php' ]; <?php namespace App\Controllers; use App\Controllers\BaseController; use \Coinpayments; class Dashboard extends BaseController { $cps_api = new Coinpayments($private_key, $public_key, 'json'); Error Class 'Coinpayments' not found search → APPPATH/Controllers/Dashboard.php at line 300 same error (02-08-2022, 05:36 PM)Z4K7 Wrote:(01-12-2022, 12:24 AM)iRedds Wrote: In a server make sure Code: Capital later Small Later Cp(sensitive) Codeigniter First, Codeigniter Then You!!
yekrinaDigitals
(02-09-2022, 03:40 AM)iRedds Wrote: What is the name of the class in the library file?[*]app / [*]Librarie... / [*]coinpayments (02-10-2022, 03:26 PM)Z4K7 Wrote:[*](02-09-2022, 03:40 AM)iRedds Wrote: What is the name of the class in the library file?[*]app / This is the result, the only thing I changed was the ThirdParty folder been ok |
Welcome Guest, Not a member yet? Register Sign In |