As I add shipping preferences in $ this-mp-post ("/ v1 / payments", $ payment_data);

0

The problem I have is that I can not add the shippingOption chosen by the user in the payment

MP offers a code for the user to choose the shipping method and the cost.

but when it's time to report the payment,

the data option given by MP, is:

$payment_data = array(
            "transaction_amount" => $payment->transaction_amount,
            "token" => $payment->token,
            "description" => $payment->description,
            "installments" => intval($payment->installments),
            "issuer_id" => intval($payment->issuer_id),
            "payment_method_id" => $payment->payment_method_id,
            "payer" => array (
                "email" => $payment->payer->email
            ),
            "additional_info" => array(
                "shipments" => array (
                    "receiver_address" => array(
                        "zip_code" => "1414",
                        "street_name" => "Street",
                        "street_number"=> 123,
                        "floor"=>4,
                        "apartment"=> "C"
                    )
                )
            )

        );

        $payment_resp = $this->mp->post("/v1/payments", $payment_data);

but does not give the option to tell you the size of the box, nor the cost of shipping.

If you give the option in the preferences of payment buttons, but there are no options when you make the payment from your own site instead of sending it to mercadopago.

Thanks

    
asked by Ignacio 03.03.2018 в 05:39
source

0 answers