1

My requirement is to add X-meli-session-id Header in the payment request to MercadoPago, but i cant find a way to add a extra header, I'm using mercadopago SKD "dx-java-1.0.33" and the request is done just calling

payment.save();

Anyone knows how to do that?

Thanks

1 Answers1

0

I solved it. I updated the SDK to 1.2.1. This versions has an option to create a payment with an object "MPRequestOptions" in the constructor of save method as follow:

MPRequestOptions mpRequestOptions = MPRequestOptions.createDefault();
    customHeaders.put("X-meli-session-id",deviceId);
    mpRequestOptions.setCustomHeaders(customHeaders);

    payment.save(mpRequestOptions);

Regards