本文整理汇总了Java中com.paymentech.orbital.sdk.interfaces.ResponseIF类的典型用法代码示例。如果您正苦于以下问题:Java ResponseIF类的具体用法?Java ResponseIF怎么用?Java ResponseIF使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ResponseIF类属于com.paymentech.orbital.sdk.interfaces包,在下文中一共展示了ResponseIF类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ccAuth
import com.paymentech.orbital.sdk.interfaces.ResponseIF; //导入依赖的package包/类
public static Map<String, Object> ccAuth(DispatchContext ctx, Map<String, Object> context) {
Delegator delegator = ctx.getDelegator();
Map<String, Object> results = ServiceUtil.returnSuccess();
Map<String, Object> props = buildOrbitalProperties(context, delegator);
props.put("transType", "AUTH_ONLY");
//Tell the request object which template to use (see RequestIF.java)
try {
request = new Request(RequestIF.NEW_ORDER_TRANSACTION);
} catch (InitializationException e) {
Debug.logError("Error in request initialization", module);
e.printStackTrace();
}
buildAuthOrAuthCaptureTransaction(context, delegator, props, request, results);
Map<String, Object> validateResults = validateRequest(context, props, request);
String respMsg = (String) validateResults.get(ModelService.RESPONSE_MESSAGE);
if (ModelService.RESPOND_ERROR.equals(respMsg)) {
results.put(ModelService.ERROR_MESSAGE, "Validation Failed - invalid values");
return results;
}
initializeTransactionProcessor();
Map<String, Object> processCardResponseContext = processCard(request);
// For Debugging Purpose
printTransResult((ResponseIF) processCardResponseContext.get("processCardResponse"));
processAuthTransResult(processCardResponseContext, results);
return results;
}
示例2: ccAuthCapture
import com.paymentech.orbital.sdk.interfaces.ResponseIF; //导入依赖的package包/类
public static Map<String, Object> ccAuthCapture(DispatchContext ctx, Map<String, Object> context) {
Delegator delegator = ctx.getDelegator();
Map<String, Object> results = ServiceUtil.returnSuccess();
Map<String, Object> props = buildOrbitalProperties(context, delegator);
props.put("transType", "AUTH_CAPTURE");
//Tell the request object which template to use (see RequestIF.java)
try {
request = new Request(RequestIF.NEW_ORDER_TRANSACTION);
} catch (InitializationException e) {
Debug.logError("Error in request initialization", module);
e.printStackTrace();
}
buildAuthOrAuthCaptureTransaction(context, delegator, props, request, results);
Map<String, Object> validateResults = validateRequest(context, props, request);
String respMsg = (String) validateResults.get(ModelService.RESPONSE_MESSAGE);
if (ModelService.RESPOND_ERROR.equals(respMsg)) {
results.put(ModelService.ERROR_MESSAGE, "Validation Failed - invalid values");
return results;
}
initializeTransactionProcessor();
Map<String, Object> processCardResponseContext = processCard(request);
// For Debugging Purpose
printTransResult((ResponseIF) processCardResponseContext.get("processCardResponse"));
processAuthCaptureTransResult(processCardResponseContext, results);
return results;
}
示例3: processAuthTransResult
import com.paymentech.orbital.sdk.interfaces.ResponseIF; //导入依赖的package包/类
private static void processAuthTransResult(Map<String, Object> processCardResponseContext, Map<String, Object> results) {
ResponseIF response = (ResponseIF) processCardResponseContext.get("processCardResponse");
Boolean authResult = (Boolean) processCardResponseContext.get("authResult");
results.put("authResult", new Boolean(authResult.booleanValue()));
results.put("authFlag", response.getResponseCode());
results.put("authMessage", response.getMessage());
if (authResult.booleanValue()) { //passed
results.put("authCode", response.getAuthCode());
results.put("authRefNum", response.getTxRefNum());
results.put("cvCode", UtilFormatOut.checkNull(response.getCVV2RespCode()));
results.put("avsCode", response.getAVSResponseCode());
results.put("processAmount", new BigDecimal(results.get("processAmount").toString()));
} else {
results.put("authCode", response.getAuthCode());
results.put("processAmount", BigDecimal.ZERO);
results.put("authRefNum", OrbitalPaymentServices.ERROR);
}
Debug.logInfo("processAuthTransResult: " + results.toString(),module);
}
示例4: processAuthCaptureTransResult
import com.paymentech.orbital.sdk.interfaces.ResponseIF; //导入依赖的package包/类
private static void processAuthCaptureTransResult(Map<String, Object> processCardResponseContext, Map<String, Object> results) {
ResponseIF response = (ResponseIF) processCardResponseContext.get("processCardResponse");
Boolean authResult = (Boolean) processCardResponseContext.get("authResult");
results.put("authResult", new Boolean(authResult.booleanValue()));
results.put("authFlag", response.getResponseCode());
results.put("authMessage", response.getMessage());
results.put("captureResult", new Boolean(authResult.booleanValue()));
results.put("captureFlag", response.getResponseCode());
results.put("captureMessage", response.getMessage());
results.put("captureRefNum", response.getTxRefNum());
if (authResult.booleanValue()) { //passed
results.put("authCode", response.getAuthCode());
results.put("authRefNum", response.getTxRefNum());
results.put("cvCode", UtilFormatOut.checkNull(response.getCVV2RespCode()));
results.put("avsCode", response.getAVSResponseCode());
results.put("processAmount", new BigDecimal(results.get("processAmount").toString()));
} else {
results.put("authCode", response.getAuthCode());
results.put("processAmount", BigDecimal.ZERO);
results.put("authRefNum", OrbitalPaymentServices.ERROR);
}
Debug.logInfo("processAuthCaptureTransResult: " + results.toString(),module);
}
示例5: printTransResult
import com.paymentech.orbital.sdk.interfaces.ResponseIF; //导入依赖的package包/类
private static void printTransResult(ResponseIF response) {
Map<String, Object> generatedResponse = FastMap.newInstance();
generatedResponse.put("isGood", response.isGood());
generatedResponse.put("isError", response.isError());
generatedResponse.put("isQuickResponse", response.isQuickResponse());
generatedResponse.put("isApproved", response.isApproved());
generatedResponse.put("isDeclined", response.isDeclined());
generatedResponse.put("AuthCode", response.getAuthCode());
generatedResponse.put("TxRefNum", response.getTxRefNum());
generatedResponse.put("ResponseCode", response.getResponseCode());
generatedResponse.put("Status", response.getStatus());
generatedResponse.put("Message", response.getMessage());
generatedResponse.put("AVSCode", response.getAVSResponseCode());
generatedResponse.put("CVV2ResponseCode", response.getCVV2RespCode());
Debug.logInfo("printTransResult === " + generatedResponse.toString(),module);
}
示例6: processCaptureTransResult
import com.paymentech.orbital.sdk.interfaces.ResponseIF; //导入依赖的package包/类
private static void processCaptureTransResult(Map<String, Object> processCardResponseContext, Map<String, Object> results) {
ResponseIF response = (ResponseIF) processCardResponseContext.get("processCardResponse");
Boolean captureResult = (Boolean) processCardResponseContext.get("authResult");
results.put("captureResult", new Boolean(captureResult.booleanValue()));
results.put("captureFlag", response.getResponseCode());
results.put("captureMessage", response.getMessage());
results.put("captureRefNum", response.getTxRefNum());
if (captureResult.booleanValue()) { //passed
results.put("captureCode", response.getAuthCode());
results.put("captureAmount", new BigDecimal(results.get("captureAmount").toString()));
} else {
results.put("captureAmount", BigDecimal.ZERO);
}
Debug.logInfo("processCaptureTransResult: " + results.toString(),module);
}
示例7: processRefundTransResult
import com.paymentech.orbital.sdk.interfaces.ResponseIF; //导入依赖的package包/类
private static void processRefundTransResult(Map<String, Object> processCardResponseContext, Map<String, Object> results) {
ResponseIF response = (ResponseIF) processCardResponseContext.get("processCardResponse");
Boolean refundResult = (Boolean) processCardResponseContext.get("authResult");
results.put("refundResult", new Boolean(refundResult.booleanValue()));
results.put("refundFlag", response.getResponseCode());
results.put("refundMessage", response.getMessage());
results.put("refundRefNum", response.getTxRefNum());
if (refundResult.booleanValue()) { //passed
results.put("refundCode", response.getAuthCode());
results.put("refundAmount", new BigDecimal(results.get("refundAmount").toString()));
} else {
results.put("refundAmount", BigDecimal.ZERO);
}
Debug.logInfo("processRefundTransResult: " + results.toString(),module);
}
示例8: processReleaseTransResult
import com.paymentech.orbital.sdk.interfaces.ResponseIF; //导入依赖的package包/类
private static void processReleaseTransResult(Map<String, Object> processCardResponseContext, Map<String, Object> results) {
ResponseIF response = (ResponseIF) processCardResponseContext.get("processCardResponse");
Boolean releaseResult = (Boolean) processCardResponseContext.get("authResult");
results.put("releaseResult", new Boolean(releaseResult.booleanValue()));
results.put("releaseFlag", response.getResponseCode());
results.put("releaseMessage", response.getMessage());
results.put("releaseRefNum", response.getTxRefNum());
if (releaseResult.booleanValue()) { //passed
results.put("releaseCode", response.getAuthCode());
results.put("releaseAmount", new BigDecimal(results.get("releaseAmount").toString()));
} else {
results.put("releaseAmount", BigDecimal.ZERO);
}
Debug.logInfo("processReleaseTransResult: " + results.toString(),module);
}