Sandbox Checkout API - Payment Error 500 #360
Unanswered
RaimundoMonzon
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have come back into a project that i havent touched in a while, and noticed the payments were not working as they used to. I have't checked if something changed and my request is out of date, however i don't think that's it. I'm performing payments as usual and keep getting the 500 Internal server error, I have tried to input a bad request on purpose and it does return the "Bad Request error message". The following is my Terminals output.
`PS C:\Users\Acari\Desktop\portfolio-web> npm run start
Servidor en marcha en el puerto: 3000
Conexion con la Base de Datos establecida.
{
items: [
{
_id: '672c3618334d168d11ac67e3',
title: 'Starry Night',
price: 18750,
quantity: 1
}
],
totalPrice: 18750,
_id: '6796d201660a1a6be84fa66e',
expireAt: '2025-01-27T00:23:29.923Z'
}
CARD_TOKEN: 1ae28956e326b1af4c0cb193b7f7f660
PAYMENT INFO: {
body: {
application_fee: null,
binary_mode: false,
campaign_id: null,
capture: false,
coupon_amount: null,
description: 'Payment for product',
differential_pricing_id: null,
external_reference: 'MP0001',
installments: 1,
metadata: null,
payer: {
entity_type: 'individual',
type: 'customer',
email: '[email protected]',
identification: [Object]
},
payment_method_id: undefined,
token: '1ae28956e326b1af4c0cb193b7f7f660',
transaction_amount: 18750
},
requestOptions: { idempotencyKey: 'f4649100-1efb-47a9-bfbb-2dba1eaba6e1' }
}
PAYMENT ERROR: { message: 'internal_error', error: null, status: 500, cause: [] }`
And this is the code i'm using:
`import { MercadoPagoConfig, Payment } from "mercadopago";
import { MP_ACCESS_TOKEN } from "../helpers/config.js";
import { v4 as uuidv4 } from 'uuid';
export class PaymentService {
}`
If anyone has any idea as to what could be causing this trouble please let me know, I've noticed this is quite a recurrent matter, so if it's a temporal issue from the API also let me know about it.
Beta Was this translation helpful? Give feedback.
All reactions