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

Invalid Parameter #7

Open
Hacedor2003 opened this issue May 8, 2024 · 2 comments
Open

Invalid Parameter #7

Hacedor2003 opened this issue May 8, 2024 · 2 comments

Comments

@Hacedor2003
Copy link

Hacedor2003 commented May 8, 2024

Buenas se puede mejorar este error

{
"error": "Invalid Parameter"
}

{
"payload": {
"reference": "pago",
"concept": "baraife",
"favorite": "true",
"amount": "2000",
"currency": "EUR",
"description": "Son productos",
"singleUse": "true",
"reasonId": 10,
"expirationDays": 1,
"lang": "es",
"urlSuccess": "https: //webhook.site/680826a5-199e-4455-babc-f47b7f26ee7e",
"urlFailed": "https: //webhook.site/680826a5-199e-4455-babc-f47b7f26ee7e",
"urlNotification": "https: //webhook.site/680826a5-199e-4455-babc-f47b7f26ee7e",
"serviceDate": "2024-05-08",
"directPayment": "true"
}
}

@yosletpp
Copy link
Contributor

yosletpp commented May 12, 2024

Ese no es el error completo. al reproducir crear un paymentcard con ese payload:

TropipayJSException [Error]: Invalid Parameter
    at handleExceptions (/home/yosle/tropipayjs/index.js:48:28)
    at PaymentCard.create (/home/yosle/tropipayjs/index.js:234:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 400,
  error: {
    type: 'VALIDATION_ERROR',
    code: 'INVALID_PARAM',
    message: 'Invalid Parameter',
    details: [
      {
        param: 'urlSuccess',
        value: 'https: //webhook.site/680826a5-199e-4455-babc-f47b7f26ee7e',
        msg: 'Invalid value',
        code: 'INVALID_PARAM',
        location: 'body',
        i18n: 'Parámetros inválidos'
      },
      {
        param: 'urlFailed',
        value: 'https: //webhook.site/680826a5-199e-4455-babc-f47b7f26ee7e',
        msg: 'Invalid value',
        code: 'INVALID_PARAM',
        location: 'body',
        i18n: 'Parámetros inválidos'
      },
      {
        param: 'urlNotification',
        value: 'https: //webhook.site/680826a5-199e-4455-babc-f47b7f26ee7e',
        msg: 'Invalid value',
        code: 'INVALID_PARAM',
        location: 'body',
        i18n: 'Parámetros inválidos'
      }
    ],
    i18n: 'Parámetros inválidos'
  }
}

Está claro que varios paramentros son invalidos, los url estan mal escritos, hay un espacio despues de https:

@Hacedor2003
Copy link
Author

Ah ya

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

2 participants