problem with listing payment orders pagseguro recurring subscription

2

I'm having a problem fetching the received data from the pagseguro payment order. I am doing the query he is bringing me the results but I can not get what he has inside paymentOrders for the simple fact that he brings me a code with someone would know how do I solve this?

below the return of pagseguro

stdClass Object
(
    [date] => 2018-05-03T14:13:44-03:00
    [resultsInThisPage] => 2
    [currentPage] => 1
    [totalPages] => 1
    [paymentOrders] => stdClass Object
        (
            [98ECCE252FFE40FBAF8A143BF6B7C77A] => stdClass Object
                (
                    [code] => 98ECCE252FFE40FBAF8A143BF6B7C77A
                    [status] => 1
                    [amount] => 75
                    [grossAmount] => 0
                    [lastEventDate] => 2018-04-08T16:01:26-03:00
                    [schedulingDate] => 2018-05-08T06:01:24-03:00
                    [transactions] => Array
                        (
                        )

                    [discount] => stdClass Object
                        (
                            [type] => DISCOUNT_PERCENT
                            [value] => 0
                        )

                )

            [CBA68FE94E0B49069397562DF8238AD9] => stdClass Object
                (
                    [code] => CBA68FE94E0B49069397562DF8238AD9
                    [status] => 2
                    [amount] => 75
                    [grossAmount] => 75
                    [lastEventDate] => 2018-04-08T16:01:26-03:00
                    [schedulingDate] => 2018-04-08T16:01:24-03:00
                    [transactions] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [code] => BDEB784FE176479BA9844976DEC8B5D3
                                    [date] => 2018-04-08T16:01:24-03:00
                                    [status] => 1
                                )

                        )

                    [discount] => stdClass Object
                        (
                            [type] => DISCOUNT_PERCENT
                            [value] => 0
                        )

                )

        )

)
    
asked by anonymous 03.05.2018 / 19:31

1 answer

0

Uses a foreach()

foreach($resultados->paymentOrders as $key => $value){
    var_dump($value);
    //ou abstrai as informações
    $code[$key]=$value;
}
    
03.05.2018 / 20:43