Market Payment - transaction_amount attribute can not be null - c #

0

I am programming with the MercadoPago API in C # and when I try to make a one-time payment, it always gives me the error:

  

4002: transaction_amount attribute can not be null

However, I am sending the amount of the transaction in the "pay" object.

Thank you very much.

  var request = new RestRequest("v1/payments", Method.POST);

        request.AddParameter("access_token", token.access_token);
        request.AddParameter("Public_key:", Config.GetPublicKey(_mode));

        var payer = new Customer()
        {
            first_name = "PEPE",
            last_name = "LUIS",
            email = "[email protected]"
        };


        var pay = new Payment()
        {
            transaction_amount = 100,
            token = "03eb840972fb016800a7a316b46ae9c9",
            description = "Compra nº 1",
            installments = 1,
            payer = payer,
            payment_method_id = "visa",
            application_fee = 5.75
        };

        request.AddObject(pay);

        // execute the request
        var response = client.Execute(request);**
    
asked by AndreaFonr 13.09.2017 в 15:48
source

0 answers