Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receiving 'The request is invalid' when trying to use '$customers->createCard()' function. #79

Open
petrusnog opened this issue Feb 24, 2021 · 4 comments

Comments

@petrusnog
Copy link

petrusnog commented Feb 24, 2021

When I try to send the request to create a new credit card:

$customerId = '<the_customer_id>';
$request = new CreateCardRequest();
$idempotencyKey = null;

$request = $customers->createCard( $customerId, $request, $idempotencyKey ); 

The MundiAPILib library returns me:

Fatal error: Uncaught MundiAPILib\Exceptions\ErrorException: The request is invalid. 
in /var/www/html/vendor/mundipagg/mundiapi/src/Controllers/BaseController.php:87
Stack trace: [...]

I also point out that It was not very clear to me, even after reading the documentation, where's to insert the data for the new card.

@Jandelson
Copy link

I have the same problem!
Estou com o mesmo problema!

@Jandelson
Copy link

"customer.name": [
"The field name must be a string with a maximum length of 64."
]
found the problem in my case was 66

@ludu25
Copy link

ludu25 commented Aug 27, 2021

"customer.name": [
"The field name must be a string with a maximum length of 64."
]
found the problem in my case was 66

Can you share how you logged the problem Jandelson?

@Jandelson
Copy link

at the time I made a change sending only 64 characters. but I'm no longer the company I don't have more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants