Welcome Guest, Not a member yet? Register   Sign In
ErrorException #1 App\Libraries\RequestLib cannot use MercadoPago\SDK - it is not a t
#1

(This post was last modified: 03-13-2021, 04:55 PM by yuma2020.)

Hi, need define in the codeigniter 4 a last version in the system 

installed via composer is update ok.
Quote:ErrorException #1

App\Libraries\RequestLib cannot use MercadoPago\SDK - it is not a trait 


define in the library:
PHP Code:
use MercadoPago\SDK;
use 
MercadoPago\Payment
please need help to solve this error.
Reply
#2

PHP Code:
use Some\Class  // <- import namespace

class 
{
   use 
Some\Class // <- use trait


You are trying to use the class as a trait.
Reply
#3

(This post was last modified: 03-14-2021, 02:00 PM by yuma2020.)

(03-13-2021, 06:24 PM)iRedds Wrote:
PHP Code:
use Some\Class  // <- import namespace

class 
{
   use Some\Class // <- use trait


You are trying to use the class as a trait.
Hello IRedds thank you for answering me, add a lot for me to collaborate with the progress in this. eh managed to solve thanks to some tests.
As you will see the definition was functional when i have removed a data from the configuration parameter of it:
The error: Mercadopago\SDK:ConfusedetAccessToken resolved by removing the word [ Mercadopago\ ]
PHP Code:
SDK::setAccessToken("TEST-1682012079503888-040315-5125e2254ad3118592785c001ad47c70-184874455"); 

Thank you for joining me on the advance. Best regards.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB