<?php

class RetornoCURL extends CI_Controller {

    function __construct() {
        parent::__construct();
    }

    public function envio() {
        $ch = curl_init();
        //Chaves de acesso  API enviadas via POST
        $post = array(
            'token_transaction' => '1f8cd2213a3d310991e1df4f58e42472'
        );
       
        
        $base = base_url(); 
        
        curl_setopt($ch, CURLOPT_URL, $base.'retorno');
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        $requisicao = curl_exec($ch);

        print_r($requisicao);

        curl_close($ch);
    }

}
