GetResponseVar Method
Parses additional information out of the response.
Object Oriented Interface
public function doGetResponseVar($name);
Procedural Interface
inpay_echeck_do_getresponsevar($res, $name);
Remarks
Due to the fact that this class supports so many gateways, only the most commonly used response variables are parsed into the Response properties. Any additional response information contained within the ResponseData may be retrieved with this GetResponseVar method. There are three formats for the ResponseData returned by the gateways this class supports: Name/value pairs, delimited list, or XML. The value you pass in the Name parameter changes based on these formats, as detailed below:
If the ResponseData property contains name/value pairs, pass the name in the Name parameter and this method will return the value. For instance, if ResponseData contains "ResponseCode=00&FraudScore=53&ApprovalCode=123456&...", calling GetResponseVar("FraudScore") will return "53".
However, if ResponseData contains a delimited list, pass the index of the field you wish to receive. For instance, if ResponseData contains "00|53|123456|...", calling GetResponseVar("1") will return "53".
Finally, if ResponseData contains XML, pass the xpath to the value you wish to receive. For instance, if ResponseData contains "<Response><Code>00</Code><FraudScore>53</FraudScore><ApprovalCode>123456</ApprovalCode></Response>", calling GetResponseVar("/Response/FraudScore") will return "53".