i am trying to create object of class


when i creating object like

$this->adapter = \Magento\Framework\App\ObjectManager::getInstance()->create('Magento\Braintree\Model\Adapter\BraintreeAdapter');

it gives error The entity that was requested doesn't exist. Verify the entity and try again.

how can i solve this?

1 Answer 1


Try the following way:

$config = [
    'merchantId' => '',
    'publicKey' => '',
    'privateKey' => '',
    'environment' => ''

$this->adapter = \Magento\Framework\App\ObjectManager::getInstance()->create('Magento\Braintree\Model\Adapter\BraintreeAdapter', $config);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.