E-Payment Integrator 2020 C++ Edition

Questions / Feedback?

GetResponseVar Method

Parses additional information out of the response.

Syntax

ANSI (Cross Platform)
char* GetResponseVar(const char* lpszName);

Unicode (Windows)
LPWSTR GetResponseVar(LPCWSTR lpszName);
- (NSString*)getResponseVar:(NSString*)name;
#define MID_ICHARGE_GETRESPONSEVAR 10

INPAY_EXTERNAL int INPAY_CALL InPay_ICharge_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);

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".

Error Handling (C++)

This method returns a String value; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

Copyright (c) 2021 /n software inc. - All rights reserved.
E-Payment Integrator 2020 C++ Edition - Version 20.0 [Build 7941]