Skip to content

apimatic_core.exceptions.auth_validation_exception.AuthValidationException: [BasicAuth: BasicAuthUserName or BasicAuthPassword is undefined.] #43

@bonanidr

Description

@bonanidr

Requiriments:
git+https://github.com/pagarme/pagarme-python-sdk.git

cliente = PagarmeapisdkClient(
service_referer_name='lady_driver',
basic_auth_credentials=BasicAuthCredentials(
username='sk_test_*********',
password=''
),
environment=Environment.PRODUCTION

    )


    request = CreateCardRequest( number= str(4000000000000010),exp_month=12,exp_year=99,cvv=str(666),holder_name=str('Jack Bauer'))

    response = cliente.customers.create_card(customer_id='cus_KED817DFeFKG53Vw', request=request)

Erro:

Error
Traceback (most recent call last):
File "/Users/bonani/Documents/LadyDriver/bps/billing/tests.py", line 28, in test_lista_livros
File "/Users/bonani/Documents/LadyDriver/bps/.venv/lib/python3.8/site-packages/pagarmeapisdk/controllers/customers_controller.py", line 651, in create_card
return super().new_api_call_builder.request(
File "/Users/bonani/Documents/LadyDriver/bps/.venv/lib/python3.8/site-packages/apimatic_core/api_call.py", line 42, in execute
_http_request = self._request_builder.build(self._global_configuration)
File "/Users/bonani/Documents/LadyDriver/bps/.venv/lib/python3.8/site-packages/apimatic_core/request_builder.py", line 122, in build
self.apply_auth(global_configuration.get_auth_managers(), http_request)
File "/Users/bonani/Documents/LadyDriver/bps/.venv/lib/python3.8/site-packages/apimatic_core/request_builder.py", line 212, in apply_auth
raise AuthValidationException(self._auth.error_message)
apimatic_core.exceptions.auth_validation_exception.AuthValidationException: [BasicAuth: BasicAuthUserName or BasicAuthPassword is undefined.]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions