ACResultCallback
The ACResultCallback API is the general callback API.
Method signature
copy
public interface ACResultCallback<T> {
public void onResult(T result, String errorCode, String errorMsg);
}Request parameters
N/A
Response parameters
Item | Type | Description | Required |
result | Integer/Boolean | The processing result. The type of this parameter and the possible results depend on the API that uses the callback. For more information, see the corresponding API reference. | Required |
errorCode | String | The result code. For more information, see Result codes. | Required |
errorMsg | String | The result message. For more information, see Result codes. | Required |
Sample
copy
public void activatePayment(IssueCardParams params, ACResultCallback<Integer> ACResultCallback) {
IAPVirtualCardClientImpl.getInstance(context).issueCard(params, new IAPVirtualCardResult<Integer>() {
@Override
public void onResult(Integer result, String errorCode, String errorMsg) {
if (ACResultCallback != null) {
if (result == 0) {
ACResultCallback.onResult(0, errorCode, errorMsg);
} else {
ACResultCallback.onResult(1, null, null);
}
}
}
});
}