Obtain specific Data from a Variable using a $ _Request

0

I would like to know with what method I can separate content from a set of data received through a request.

The received data arrive in the following way:

    <MPFIN>
 <IDTRX>1344</IDTRX> - Id Transacción del comercio informado.

<CODRET>0000</CODRET> - Código retorno que indica el estado final de la transacción.

<DESCODRET>Transacción exitosa</DESCODRET> - Descripción del estado final de la
transacción.

   </MPFIN>

How do I validate the transaction code? that is, only the field <CODRET>0000</CODRET>

What I want is to compare by if that depending on the number you receive in this field the actions to be performed (if I receive 0000 I do something and if I receive 0001 do something else).

Keep in mind that the variable or field MPFIN send it to me from an external server using a $_POST[] , it is of type String and I use a $_REQUEST to obtain the data.

I do not know how to separate each field of this variable that I receive and obtain the field I want to evaulate.

Is there a function or method to do what I want?

    
asked by Alvaro Santafe 22.11.2017 в 19:16
source

0 answers