I'm still pretty new to xml and SOAP and need assistance parsing the following data ( from Dumper($data) ):
$VAR1 = {
'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
'soap:Body' => {
'PurchasePinResponse' => {
'xmlns' => 'http://www.pininteract.com',
'orderResponse' => {
'xmlns' => 'urn:pininteract.com',
'invoice' => {
'invoiceAmount' => '45.000',
'faceValueAmount' => '50.00',
'cards' => {
'card' => {
'skuId' => '199',
'pins' => {
'pin' => {
'pinNumber' => '50489898515256',
'controlNumber' => '111111111111'
}
},
'name' => 'Simple Mobile',
'faceValue' => '50.00'
}
},
'invoiceNumber' => '4515563',
'transactionDateTime' => '2013-07-12T11:30:07.17'
},
'responseCode' => '000',
'version' => '1.0'
}
}
},
'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema',
'xmlns:soap' => 'http://schemas.xmlsoap.org/soap/envelope/'
};
I need to extract the PIN number to store it in a database.
I know the syntax should be something along the lines of:
$something->{more_something}->{more_something}
I am in a pinch and not getting it done. If anyone can help me I would appreciate it. Once I see it I will be able to see how you arrived at the solution.
Thanks.
$VAR1 = {
'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
'soap:Body' => {
'PurchasePinResponse' => {
'xmlns' => 'http://www.pininteract.com',
'orderResponse' => {
'xmlns' => 'urn:pininteract.com',
'invoice' => {
'invoiceAmount' => '45.000',
'faceValueAmount' => '50.00',
'cards' => {
'card' => {
'skuId' => '199',
'pins' => {
'pin' => {
'pinNumber' => '50489898515256',
'controlNumber' => '111111111111'
}
},
'name' => 'Simple Mobile',
'faceValue' => '50.00'
}
},
'invoiceNumber' => '4515563',
'transactionDateTime' => '2013-07-12T11:30:07.17'
},
'responseCode' => '000',
'version' => '1.0'
}
}
},
'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema',
'xmlns:soap' => 'http://schemas.xmlsoap.org/soap/envelope/'
};
I need to extract the PIN number to store it in a database.
I know the syntax should be something along the lines of:
$something->{more_something}->{more_something}
I am in a pinch and not getting it done. If anyone can help me I would appreciate it. Once I see it I will be able to see how you arrived at the solution.
Thanks.