1 25 package org.ofbiz.accounting.thirdparty.cybersource; 26 27 import java.text.DecimalFormat ; 28 import java.util.HashMap ; 29 import java.util.Iterator ; 30 import java.util.List ; 31 import java.util.Map ; 32 import java.util.Properties ; 33 34 import com.cybersource.ws.client.Client; 35 import com.cybersource.ws.client.ClientException; 36 import com.cybersource.ws.client.FaultException; 37 38 import org.ofbiz.accounting.payment.PaymentGatewayServices; 39 import org.ofbiz.base.util.Debug; 40 import org.ofbiz.base.util.SSLUtil; 41 import org.ofbiz.base.util.StringUtil; 42 import org.ofbiz.base.util.UtilMisc; 43 import org.ofbiz.base.util.UtilProperties; 44 import org.ofbiz.base.util.UtilValidate; 45 import org.ofbiz.entity.GenericEntityException; 46 import org.ofbiz.entity.GenericValue; 47 import org.ofbiz.service.DispatchContext; 48 import org.ofbiz.service.ServiceUtil; 49 50 57 public class IcsPaymentServices { 58 59 public static final String module = IcsPaymentServices.class.getName(); 60 61 static { 63 SSLUtil.loadJsseProperties(); 64 } 65 66 public static Map ccAuth(DispatchContext dctx, Map context) { 67 Properties props = buildCsProperties(context); 69 if (props == null) { 70 return ServiceUtil.returnError("ERROR: Getting Cybersource property configuration"); 71 } 72 73 Map request = buildAuthRequest(context); 74 request.put("merchantID", props.get("merchantID")); 75 76 Map reply = null; 78 try { 79 reply = Client.runTransaction(request, props); 80 } catch (FaultException e) { 81 Debug.logError(e, "ERROR: Fault from CyberSource", module); 82 Debug.logError(e, "Fault : " + e.getFaultString(), module); 83 return ServiceUtil.returnError("Unable to communicate with CyberSource"); 84 } catch (ClientException e) { 85 Debug.logError(e, "ERROR: CyberSource Client exception : " + e.getMessage(), module); 86 return ServiceUtil.returnError("Unable to communicate with CyberSource"); 87 } 88 89 Map result = ServiceUtil.returnSuccess(); 91 processAuthResult(reply, result); 92 return result; 93 } 94 95 public static Map ccReAuth(DispatchContext dctx, Map context) { 96 return ServiceUtil.returnSuccess(); 97 } 98 99 public static Map ccCapture(DispatchContext dctx, Map context) { 100 GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference"); 101 102 GenericValue authTransaction = (GenericValue) context.get("authTrans"); 104 105 if (authTransaction == null){ 106 authTransaction = PaymentGatewayServices.getAuthTransaction(orderPaymentPreference); 107 } 108 109 if (authTransaction == null) { 110 return ServiceUtil.returnError("No authorization transaction found for the OrderPaymentPreference; cannot capture"); 111 } 112 113 Properties props = buildCsProperties(context); 115 if (props == null) { 116 return ServiceUtil.returnError("ERROR: Getting Cybersource property configuration"); 117 } 118 119 Map request = buildCaptureRequest(context, authTransaction); 120 request.put("merchantID", props.get("merchantID")); 121 122 Map reply = null; 124 try { 125 reply = Client.runTransaction(request, props); 126 } catch (FaultException e) { 127 Debug.logError(e, "ERROR: Fault from CyberSource", module); 128 return ServiceUtil.returnError("Unable to communicate with CyberSource"); 129 } catch (ClientException e) { 130 Debug.logError(e, "ERROR: CyberSource Client exception : " + e.getMessage(), module); 131 return ServiceUtil.returnError("Unable to communicate with CyberSource"); 132 } 133 134 Map result = ServiceUtil.returnSuccess(); 136 processCaptureResult(reply, result); 137 return result; 138 } 139 140 public static Map ccRelease(DispatchContext dctx, Map context) { 141 GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference"); 142 GenericValue authTransaction = PaymentGatewayServices.getAuthTransaction(orderPaymentPreference); 143 if (authTransaction == null) { 144 return ServiceUtil.returnError("No authorization transaction found for the OrderPaymentPreference; cannot release"); 145 } 146 147 Properties props = buildCsProperties(context); 149 if (props == null) { 150 return ServiceUtil.returnError("ERROR: Getting Cybersource property configuration"); 151 } 152 153 Map request = buildReleaseRequest(context, authTransaction); 154 request.put("merchantID", props.get("merchantID")); 155 156 Map reply = null; 158 try { 159 reply = Client.runTransaction(request, props); 160 } catch (FaultException e) { 161 Debug.logError(e, "ERROR: Fault from CyberSource", module); 162 return ServiceUtil.returnError("Unable to communicate with CyberSource"); 163 } catch (ClientException e) { 164 Debug.logError(e, "ERROR: CyberSource Client exception : " + e.getMessage(), module); 165 return ServiceUtil.returnError("Unable to communicate with CyberSource"); 166 } 167 168 Map result = ServiceUtil.returnSuccess(); 170 processReleaseResult(reply, result); 171 return result; 172 } 173 174 public static Map ccRefund(DispatchContext dctx, Map context) { 175 GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference"); 176 GenericValue authTransaction = PaymentGatewayServices.getAuthTransaction(orderPaymentPreference); 177 if (authTransaction == null) { 178 return ServiceUtil.returnError("No authorization transaction found for the OrderPaymentPreference; cannot refund"); 179 } 180 181 Properties props = buildCsProperties(context); 183 if (props == null) { 184 return ServiceUtil.returnError("ERROR: Getting Cybersource property configuration"); 185 } 186 187 Map request = buildRefundRequest(context, authTransaction); 188 request.put("merchantID", props.get("merchantID")); 189 190 Map reply = null; 192 try { 193 reply = Client.runTransaction(request, props); 194 } catch (FaultException e) { 195 Debug.logError(e, "ERROR: Fault from CyberSource", module); 196 return ServiceUtil.returnError("Unable to communicate with CyberSource"); 197 } catch (ClientException e) { 198 Debug.logError(e, "ERROR: CyberSource Client exception : " + e.getMessage(), module); 199 return ServiceUtil.returnError("Unable to communicate with CyberSource"); 200 } 201 202 Map result = ServiceUtil.returnSuccess(); 204 processRefundResult(reply, result); 205 return result; 206 } 207 208 public static Map ccCredit(DispatchContext dctx, Map context) { 209 Properties props = buildCsProperties(context); 211 if (props == null) { 212 return ServiceUtil.returnError("ERROR: Getting Cybersource property configuration"); 213 } 214 215 Map request = buildCreditRequest(context); 216 request.put("merchantID", props.get("merchantID")); 217 218 Map reply = null; 220 try { 221 reply = Client.runTransaction(request, props); 222 } catch (FaultException e) { 223 Debug.logError(e, "ERROR: Fault from CyberSource", module); 224 return ServiceUtil.returnError("Unable to communicate with CyberSource"); 225 } catch (ClientException e) { 226 Debug.logError(e, "ERROR: CyberSource Client exception : " + e.getMessage(), module); 227 return ServiceUtil.returnError("Unable to communicate with CyberSource"); 228 } 229 230 Map result = ServiceUtil.returnSuccess(); 232 processCreditResult(reply, result); 233 return result; 234 } 235 236 private static Properties buildCsProperties(Map context) { 237 String configString = (String ) context.get("paymentConfig"); 238 if (configString == null) { 239 configString = "payment.properties"; 240 } 241 242 String merchantId = UtilProperties.getPropertyValue(configString, "payment.cybersource.merchantID"); 243 String targetApi = UtilProperties.getPropertyValue(configString, "payment.cybersource.api.version"); 244 String production = UtilProperties.getPropertyValue(configString, "payment.cybersource.production"); 245 String enableLog = UtilProperties.getPropertyValue(configString, "payment.cybersource.log"); 246 String logSize = UtilProperties.getPropertyValue(configString, "payment.cybersource.log.size"); 247 String logFile = UtilProperties.getPropertyValue(configString, "payment.cybersource.log.file"); 248 String logDir = UtilProperties.getPropertyValue(configString, "payment.cybersource.log.dir"); 249 250 String keysPath = UtilProperties.getPropertyValue(configString, "payment.cybersource.keysDir"); 251 String keysFile = UtilProperties.getPropertyValue(configString, "payment.cybersource.keysFile"); 252 253 if (UtilValidate.isEmpty(merchantId)) { 255 Debug.logWarning("The merchantId property in [" + configString + "] is not configured", module); 256 return null; 257 } 258 if (UtilValidate.isEmpty(keysPath)) { 259 Debug.logWarning("The keysDir property in [" + configString + "] is not configured", module); 260 return null; 261 } 262 263 Properties props = new Properties (); 265 props.put("merchantID", merchantId); 266 props.put("keysDirectory", keysPath); 267 props.put("targetAPIVersion", targetApi); 268 props.put("sendToProduction", production); 269 props.put("enableLog", enableLog); 270 props.put("logDirectory", logDir); 271 props.put("logFilename", logFile); 272 props.put("logMaximumSize", logSize); 273 274 if (keysFile != null && keysFile.length() > 0) { 275 props.put("alternateKeyFilename", keysFile); 276 } 277 279 return props; 280 } 281 282 private static Map buildAuthRequest(Map context) { 283 String configString = (String ) context.get("paymentConfig"); 284 String currency = (String ) context.get("currency"); 285 if (configString == null) { 286 configString = "payment.properties"; 287 } 288 289 String capture = UtilProperties.getPropertyValue(configString, "payment.cybersource.autoBill", "false"); 291 String orderId = (String ) context.get("orderId"); 292 293 Map request = new HashMap (); 294 request.put("ccAuthService_run", "true"); request.put("ccCaptureService_run", capture); request.put("merchantReferenceCode", orderId); request.put("purchaseTotals_currency", currency); appendFullBillingInfo(request, context); appendItemLineInfo(request, context, "processAmount"); appendAvsRules(request, context); 302 return request; 303 } 304 305 private static Map buildCaptureRequest(Map context, GenericValue authTransaction) { 306 GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference"); 307 String configString = (String ) context.get("paymentConfig"); 308 String currency = (String ) context.get("currency"); 309 if (configString == null) { 310 configString = "payment.properties"; 311 } 312 String merchantDesc = UtilProperties.getPropertyValue(configString, "payment.cybersource.merchantDescr", null); 313 String merchantCont = UtilProperties.getPropertyValue(configString, "payment.cybersource.merchantContact", null); 314 315 Map request = new HashMap (); 316 request.put("ccCaptureService_run", "true"); 317 request.put("ccCaptureService_authRequestID", authTransaction.getString("referenceNum")); 318 request.put("item_0_unitPrice", getAmountString(context, "captureAmount")); 319 request.put("merchantReferenceCode", orderPaymentPreference.getString("orderId")); 320 request.put("purchaseTotals_currency", currency); 321 322 326 if (merchantDesc != null) { 327 request.put("invoiceHeader_merchantDescriptor", merchantDesc); } 329 if (merchantCont != null) { 330 request.put("invoiceHeader_merchantDescriptorContact", merchantCont); } 332 333 return request; 334 } 335 336 private static Map buildReleaseRequest(Map context, GenericValue authTransaction) { 337 GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference"); 338 String currency = (String ) context.get("currency"); 339 Map request = new HashMap (); 340 request.put("ccAuthReversalService_run", "true"); 341 request.put("ccAuthReversalService_authRequestID", authTransaction.getString("referenceNum")); 342 request.put("item_0_unitPrice", getAmountString(context, "releaseAmount")); 343 request.put("merchantReferenceCode", orderPaymentPreference.getString("orderId")); 344 request.put("purchaseTotals_currency", currency); 345 return request; 346 } 347 348 private static Map buildRefundRequest(Map context, GenericValue authTransaction) { 349 GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference"); 350 String configString = (String ) context.get("paymentConfig"); 351 String currency = (String ) context.get("currency"); 352 if (configString == null) { 353 configString = "payment.properties"; 354 } 355 String merchantDesc = UtilProperties.getPropertyValue(configString, "payment.cybersource.merchantDescr", null); 356 String merchantCont = UtilProperties.getPropertyValue(configString, "payment.cybersource.merchantContact", null); 357 358 Map request = new HashMap (); 359 request.put("ccCreditService_run", "true"); 360 request.put("ccCreditService_captureRequestID", authTransaction.getString("referenceNum")); 361 request.put("item_0_unitPrice", getAmountString(context, "refundAmount")); 362 request.put("merchantReferenceCode", orderPaymentPreference.getString("orderId")); 363 request.put("purchaseTotals_currency", currency); 364 365 if (merchantDesc != null) { 366 request.put("invoiceHeader_merchantDescriptor", merchantDesc); } 368 if (merchantCont != null) { 369 request.put("invoiceHeader_merchantDescriptorContact", merchantCont); } 371 372 return request; 373 } 374 375 private static Map buildCreditRequest(Map context) { 376 String refCode = (String ) context.get("referenceCode"); 377 Map request = new HashMap (); 378 request.put("ccCreditService_run", "true"); request.put("merchantReferenceCode", refCode); appendFullBillingInfo(request, context); appendItemLineInfo(request, context, "creditAmount"); return request; 383 } 384 385 private static void appendAvsRules(Map request, Map context) { 386 String configString = (String ) context.get("paymentConfig"); 387 if (configString == null) { 388 configString = "payment.properties"; 389 } 390 String avsCodes = UtilProperties.getPropertyValue(configString, "payment.cybersource.avsDeclineCodes", null); 391 392 GenericValue party = (GenericValue) context.get("billToParty"); 393 if (party != null) { 394 GenericValue avsOverride = null; 395 396 try { 397 avsOverride = party.getDelegator().findByPrimaryKey("PartyIcsAvsOverride", 398 UtilMisc.toMap("partyId", party.getString("partyId"))); 399 } catch (GenericEntityException e) { 400 Debug.logError(e, module); 401 } 402 if (avsOverride != null && avsOverride.get("avsDeclineString") != null) { 403 String overrideString = avsOverride.getString("avsDeclineString"); 404 if (overrideString != null && overrideString.length() > 0) { 405 avsCodes = overrideString; 406 } 407 } 408 } 409 410 if (avsCodes != null && avsCodes.length() > 0) { 411 request.put("businessRules_declineAVSFlags", avsCodes); 412 } 413 414 String avsIgnore = UtilProperties.getPropertyValue(configString, "payment.cybersource.avsDeclineCodes", "false"); 415 request.put("businessRules_ignoreAVS", avsIgnore); 416 } 417 418 private static void appendFullBillingInfo(Map request, Map context) { 419 GenericValue party = (GenericValue) context.get("billToParty"); 421 422 GenericValue email = (GenericValue) context.get("billToEmail"); 424 if (email != null) { 425 request.put("billTo_email", email.getString("infoString")); 426 } else { 427 Debug.logWarning("Email not defined; Cybersource will fail.", module); 428 } 429 430 432 GenericValue creditCard = (GenericValue) context.get("creditCard"); 434 if (creditCard != null) { 435 List expDateList = StringUtil.split(creditCard.getString("expireDate"), "/"); 436 437 request.put("billTo_firstName", creditCard.getString("firstNameOnCard")); 438 request.put("billTo_lastName", creditCard.getString("lastNameOnCard")); 439 request.put("card_accountNumber", creditCard.getString("cardNumber")); 440 request.put("card_expirationMonth", expDateList.get(0)); 441 request.put("card_expirationYear", expDateList.get(1)); 442 } else { 443 Debug.logWarning("CreditCard not defined; Cybersource will fail.", module); 444 } 445 446 String cvNum = (String ) context.get("cardSecurityCode"); 448 String cvSet = UtilValidate.isEmpty(cvNum) ? "1" : "0"; 449 request.put("card_cvIndicator", cvSet); 450 if ("1".equals(cvNum)) { 451 request.put("card_cvNumber", cvNum); 452 } 453 454 GenericValue billingAddress = (GenericValue) context.get("billingAddress"); 456 457 if (billingAddress != null) { 458 request.put("billTo_street1", billingAddress.getString("address1")); 459 if (billingAddress.get("address2") != null) { 460 request.put("billTo_street2", billingAddress.getString("address2")); 461 } 462 request.put("billTo_city", billingAddress.getString("city")); 463 String bCountry = billingAddress.get("countryGeoId") != null ? billingAddress.getString("countryGeoId") : "USA"; 464 465 request.put("billTo_country", bCountry); 466 request.put("billTo_postalCode", billingAddress.getString("postalCode")); 467 if (billingAddress.get("stateProvinceGeoId") != null) { 468 request.put("billTo_state", billingAddress.getString("stateProvinceGeoId")); 469 } 470 } else { 471 Debug.logWarning("BillingAddress not defined; Cybersource will fail.", module); 472 } 473 474 GenericValue shippingAddress = (GenericValue) context.get("shippingAddress"); 476 if (shippingAddress != null) { 477 if (creditCard != null) { 478 request.put("shipTo_firstName", creditCard.getString("firstNameOnCard")); 480 request.put("shipTo_lastName", creditCard.getString("lastNameOnCard")); 481 } 482 483 request.put("shipTo_street1", shippingAddress.getString("address1")); 484 if (shippingAddress.get("address2") != null) { 485 request.put("shipTo_street2", shippingAddress.getString("address2")); 486 } 487 request.put("shipTo_city", shippingAddress.getString("city")); 488 String sCountry = shippingAddress.get("countryGeoId") != null ? shippingAddress.getString("countryGeoId") : "USA"; 489 490 request.put("shipTo_country", sCountry); 491 request.put("shipTo_postalCode", shippingAddress.getString("postalCode")); 492 if (shippingAddress.get("stateProvinceGeoId") != null) { 493 request.put("shipTo_state", shippingAddress.getString("stateProvinceGeoId")); 494 } 495 } 496 } 497 498 private static void appendItemLineInfo(Map request, Map context, String amountField) { 499 String currency = (String ) context.get("currency"); 501 502 int lineNumber = 0; 503 request.put("item_" + lineNumber + "_unitPrice", getAmountString(context, amountField)); 504 505 request.put("purchaseTotals_currency", currency); 507 508 List orderItems = (List ) context.get("orderItems"); 510 if (orderItems != null) { 511 Iterator itemIterator = orderItems.iterator(); 512 513 while (itemIterator.hasNext()) { 514 lineNumber++; 515 GenericValue item = (GenericValue) itemIterator.next(); 516 GenericValue product = null; 517 try { 518 product = item.getRelatedOne("Product"); 519 } catch (GenericEntityException e) { 520 Debug.logError(e, "ERROR: Unable to get Product from OrderItem, not passing info to CyberSource"); 521 } 522 523 if (product != null) { 524 request.put("item_" + lineNumber + "_productName", product.getString("productName")); 525 request.put("item_" + lineNumber + "_productSKU", product.getString("productId")); 526 } else { 527 request.put("item_" + lineNumber + "_productName", item.getString("description")); 529 } 530 531 Double quantity = item.getDouble("quantity"); 533 534 long roundQ = Math.round(quantity.doubleValue()); 536 Double rounded = new Double (new Long (roundQ).toString()); 537 538 if (rounded.doubleValue() != quantity.doubleValue()) { 539 request.put("item_" + lineNumber + "_quantity", "1"); 540 } else { 541 request.put("", new Integer (quantity.intValue()).toString()); 542 } 543 544 request.put("item_" + lineNumber + "_unitPrice", "0.0000"); 546 } 547 } 548 } 549 550 private static String getAmountString(Map context, String amountField) { 551 String currencyFormat = UtilProperties.getPropertyValue("general.properties", "currency.decimal.format", "##0.00"); 552 DecimalFormat formatter = new DecimalFormat (currencyFormat); 553 Double processAmount = (Double ) context.get(amountField); 554 return formatter.format(processAmount); 555 } 556 557 private static void processAuthResult(Map reply, Map result) { 558 String decision = getDecision(reply); 559 if ("ACCEPT".equalsIgnoreCase(decision)) { 560 result.put("authCode", reply.get("ccAuthReply_authorizationCode")); 561 result.put("authResult", new Boolean (true)); 562 } else { 563 result.put("authCode", decision); 564 result.put("authResult", new Boolean (false)); 565 } 566 567 if (reply.get("ccAuthReply_amount") != null) { 568 result.put("processAmount", new Double ((String ) reply.get("ccAuthReply_amount"))); 569 } else { 570 result.put("processAmount", new Double (0.00)); 571 } 572 573 result.put("authRefNum", reply.get("requestID")); 574 result.put("authFlag", reply.get("ccAuthReply_reasonCode")); 575 result.put("authMessage", reply.get("ccAuthReply_processorResponse")); 576 result.put("cvCode", reply.get("ccAuthReply_cvCode")); 577 result.put("avsCode", reply.get("ccAuthReply_avsCode")); 578 result.put("scoreCode", reply.get("ccAuthReply_authFactorCode")); 579 result.put("captureRefNum", reply.get("requestID")); result.put("captureCode", reply.get("ccCaptureReply_reconciliationID")); 581 } 582 583 private static void processCaptureResult(Map reply, Map result) { 584 String decision = getDecision(reply); 585 if ("ACCEPT".equalsIgnoreCase(decision)) { 586 result.put("captureResult", new Boolean (true)); 587 } else { 588 result.put("captureResult", new Boolean (false)); 589 } 590 591 if (reply.get("ccCaptureReply_amount") != null) { 592 result.put("captureAmount", new Double ((String ) reply.get("ccCaptureReply_amount"))); 593 } else { 594 result.put("captureAmount", new Double (0.00)); 595 } 596 597 result.put("captureRefNum", reply.get("requestID")); 598 result.put("captureCode", reply.get("ccCaptureReply_reconciliationID")); 599 result.put("captureFlag", reply.get("ccCaptureReply_reasonCode")); 600 result.put("captureMessage", reply.get("decision")); 601 } 602 603 private static void processReleaseResult(Map reply, Map result) { 604 String decision = getDecision(reply); 605 if ("ACCEPT".equalsIgnoreCase(decision)) { 606 result.put("releaseResult", new Boolean (true)); 607 } else { 608 result.put("releaseResult", new Boolean (false)); 609 } 610 611 if (reply.get("ccAuthReversalReply_amount") != null) { 612 result.put("releaseAmount", new Double ((String ) reply.get("ccAuthReversalReply_amount"))); 613 } else { 614 result.put("releaseAmount", new Double (0.00)); 615 } 616 617 result.put("releaseRefNum", reply.get("requestID")); 618 result.put("releaseCode", reply.get("ccAuthReversalReply_authorizationCode")); 619 result.put("releaseFlag", reply.get("ccAuthReversalReply_reasonCode")); 620 result.put("releaseMessage", reply.get("decision")); 621 } 622 623 private static void processRefundResult(Map reply, Map result) { 624 String decision = getDecision(reply); 625 if ("ACCEPT".equalsIgnoreCase(decision)) { 626 result.put("refundResult", new Boolean (true)); 627 } else { 628 result.put("refundResult", new Boolean (false)); 629 } 630 631 if (reply.get("ccCreditReply_amount") != null) { 632 result.put("refundAmount", new Double ((String ) reply.get("ccCreditReply_amount"))); 633 } else { 634 result.put("refundAmount", new Double (0.00)); 635 } 636 637 result.put("refundRefNum", reply.get("requestID")); 638 result.put("refundCode", reply.get("ccCreditReply_reconciliationID")); 639 result.put("refundFlag", reply.get("ccCreditReply_reasonCode")); 640 result.put("refundMessage", reply.get("decision")); 641 } 642 643 private static void processCreditResult(Map reply, Map result) { 644 String decision = (String ) reply.get("decision"); 645 if ("ACCEPT".equalsIgnoreCase(decision)) { 646 result.put("creditResult", new Boolean (true)); 647 } else { 648 result.put("creditResult", new Boolean (false)); 649 } 650 651 if (reply.get("ccCreditReply_amount") != null) { 652 result.put("creditAmount", new Double ((String ) reply.get("ccCreditReply_amount"))); 653 } else { 654 result.put("creditAmount", new Double (0.00)); 655 } 656 657 result.put("creditRefNum", reply.get("requestID")); 658 result.put("creditCode", reply.get("ccCreditReply_reconciliationID")); 659 result.put("creditFlag", reply.get("ccCreditReply_reasonCode")); 660 result.put("creditMessage", reply.get("decision")); 661 } 662 663 private static String getDecision(Map reply) { 664 String decision = (String ) reply.get("decision"); 665 String reasonCode = (String ) reply.get("reasonCode"); 666 if (!"ACCEPT".equalsIgnoreCase(decision)) { 667 Debug.logInfo("CyberSource : " + decision + " (" + reasonCode + ")", module); 668 Debug.logInfo("Reply Dump : " + reply, module); 669 } 670 return decision; 671 } 672 } 673 | Popular Tags |