当前位置: 首页>>代码示例>>Java>>正文


Java FieldNotFoundException类代码示例

本文整理汇总了Java中com.paymentech.orbital.sdk.request.FieldNotFoundException的典型用法代码示例。如果您正苦于以下问题:Java FieldNotFoundException类的具体用法?Java FieldNotFoundException怎么用?Java FieldNotFoundException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


FieldNotFoundException类属于com.paymentech.orbital.sdk.request包,在下文中一共展示了FieldNotFoundException类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildReleaseTransaction

import com.paymentech.orbital.sdk.request.FieldNotFoundException; //导入依赖的package包/类
private static void buildReleaseTransaction(Map<String, Object> params, Delegator delegator, Map<String, Object> props, RequestIF request, Map<String, Object> results) {
    BigDecimal amount = (BigDecimal) params.get("releaseAmount");
    GenericValue authTransaction = (GenericValue) params.get("authTransaction");
    String orderId = UtilFormatOut.checkNull((String)params.get("orderId"));
    try {
        //If there were no errors preparing the template, we can now specify the data
        //Basic Auth Fields
        request.setFieldValue("MerchantID", UtilFormatOut.checkNull(props.get("merchantId").toString()));
        request.setFieldValue("BIN", BIN_VALUE);
        request.setFieldValue("TxRefNum", UtilFormatOut.checkNull(authTransaction.get("referenceNum").toString()));
        request.setFieldValue("OrderID", UtilFormatOut.checkNull(orderId));

        //Display the request
        Debug.logInfo("\nRelease Request:\n ======== " + request.getXML());
        results.put("releaseAmount", amount);
    } catch (InitializationException ie) {
        Debug.logInfo("Unable to initialize request object", module);
    } catch (FieldNotFoundException fnfe) {
        Debug.logError("Unable to find XML field in template" + fnfe.getMessage(), module);
    } catch (Exception e) {
        e.printStackTrace();
    }
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:24,代码来源:OrbitalPaymentServices.java

示例2: buildCaptureTransaction

import com.paymentech.orbital.sdk.request.FieldNotFoundException; //导入依赖的package包/类
private static void buildCaptureTransaction(Map<String, Object> params, Delegator delegator, Map<String, Object> props, RequestIF request, Map<String, Object> results) {
    GenericValue authTransaction = (GenericValue) params.get("authTransaction");
    GenericValue creditCard = (GenericValue) params.get("creditCard");
    BigDecimal amount = (BigDecimal) params.get("captureAmount");
    String amountValue = amount.setScale(decimals, rounding).movePointRight(2).toPlainString();
    String orderId = UtilFormatOut.checkNull((String)params.get("orderId"));
    try {
        //If there were no errors preparing the template, we can now specify the data
        //Basic Auth Fields
        request.setFieldValue("MerchantID", UtilFormatOut.checkNull(props.get("merchantId").toString()));
        request.setFieldValue("BIN", BIN_VALUE);
        request.setFieldValue("TxRefNum", UtilFormatOut.checkNull(authTransaction.get("referenceNum").toString()));
        request.setFieldValue("OrderID", UtilFormatOut.checkNull(orderId));
        request.setFieldValue("Amount", UtilFormatOut.checkNull(amountValue));

        request.setFieldValue("PCDestName", UtilFormatOut.checkNull(creditCard.getString("firstNameOnCard") + creditCard.getString("lastNameOnCard")));
        if (UtilValidate.isNotEmpty(creditCard.getString("contactMechId"))) {
            GenericValue address = creditCard.getRelatedOne("PostalAddress", false);
            if (address != null) {
                request.setFieldValue("PCOrderNum", UtilFormatOut.checkNull(orderId));
                request.setFieldValue("PCDestAddress1", UtilFormatOut.checkNull(address.getString("address1")));
                request.setFieldValue("PCDestAddress2", UtilFormatOut.checkNull(address.getString("address2")));
                request.setFieldValue("PCDestCity", UtilFormatOut.checkNull(address.getString("city")));
                request.setFieldValue("PCDestState", UtilFormatOut.checkNull(address.getString("stateProvinceGeoId")));
                request.setFieldValue("PCDestZip", UtilFormatOut.checkNull(address.getString("postalCode")));
            }
        }
        //Display the request
        Debug.logInfo("\nCapture Request:\n ======== " + request.getXML());
        results.put("captureAmount", amount);
    } catch (InitializationException ie) {
        Debug.logInfo("Unable to initialize request object", module);
    } catch (FieldNotFoundException fnfe) {
        Debug.logError("Unable to find XML field in template" + fnfe.getMessage(), module);
    } catch (Exception e) {
        e.printStackTrace();
    }
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:39,代码来源:OrbitalPaymentServices.java

示例3: buildRefundTransaction

import com.paymentech.orbital.sdk.request.FieldNotFoundException; //导入依赖的package包/类
private static void buildRefundTransaction(Map<String, Object> params, Map<String, Object> props, RequestIF request, Map<String, Object> results) {
    GenericValue cc = (GenericValue) params.get("creditCard");
    BigDecimal amount = (BigDecimal) params.get("refundAmount");
    String amountValue = amount.setScale(decimals, rounding).movePointRight(2).toPlainString();
    String number = UtilFormatOut.checkNull(cc.getString("cardNumber"));
    String expDate = UtilFormatOut.checkNull(cc.getString("expireDate"));
    expDate = formatExpDateForOrbital(expDate);
    String orderId = UtilFormatOut.checkNull((String)params.get("orderId"));
    try {
        //If there were no errors preparing the template, we can now specify the data
        //Basic Auth Fields
        request.setFieldValue("IndustryType", "EC");
        request.setFieldValue("MessageType", "R");
        request.setFieldValue("MerchantID", UtilFormatOut.checkNull(props.get("merchantId").toString()));
        request.setFieldValue("BIN", BIN_VALUE);
        request.setFieldValue("OrderID", UtilFormatOut.checkNull(orderId));
        request.setFieldValue("AccountNum", UtilFormatOut.checkNull(number));
        request.setFieldValue("Amount", UtilFormatOut.checkNull(amountValue));
        request.setFieldValue("Exp", UtilFormatOut.checkNull(expDate));
        request.setFieldValue("Comments", "This is a credit card refund");

        Debug.logInfo("\nRefund Request:\n ======== " + request.getXML());
        results.put("refundAmount", amount);
    } catch (InitializationException ie) {
        Debug.logInfo("Unable to initialize request object", module);
    } catch (FieldNotFoundException fnfe) {
        Debug.logError("Unable to find XML field in template", module);
    } catch (Exception e) {
        e.printStackTrace();
    }
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:32,代码来源:OrbitalPaymentServices.java

示例4: buildAuthOrAuthCaptureTransaction

import com.paymentech.orbital.sdk.request.FieldNotFoundException; //导入依赖的package包/类
private static void buildAuthOrAuthCaptureTransaction(Map<String, Object> params, Delegator delegator, Map<String, Object> props, RequestIF request, Map<String, Object> results) {
    GenericValue cc = (GenericValue) params.get("creditCard");
    BigDecimal amount = (BigDecimal) params.get("processAmount");
    String amountValue = amount.setScale(decimals, rounding).movePointRight(2).toPlainString();
    String number = UtilFormatOut.checkNull(cc.getString("cardNumber"));
    String expDate = UtilFormatOut.checkNull(cc.getString("expireDate"));
    expDate = formatExpDateForOrbital(expDate);
    String cardSecurityCode = (String) params.get("cardSecurityCode");
    String orderId = UtilFormatOut.checkNull((String)params.get("orderId"));
    String transType = props.get("transType").toString();
    String messageType = null;
    if ("AUTH_ONLY".equals(transType)) {
        messageType = "A";
    } else if ("AUTH_CAPTURE".equals(transType)) {
        messageType = "AC";
    }
    try {
        request.setFieldValue("IndustryType", "EC");
        request.setFieldValue("MessageType", UtilFormatOut.checkNull(messageType));
        request.setFieldValue("MerchantID", UtilFormatOut.checkNull(props.get("merchantId").toString()));
        request.setFieldValue("BIN", BIN_VALUE);
        request.setFieldValue("OrderID", UtilFormatOut.checkNull(orderId));
        request.setFieldValue("AccountNum", UtilFormatOut.checkNull(number));

        request.setFieldValue("Amount", UtilFormatOut.checkNull(amountValue));
        request.setFieldValue("Exp", UtilFormatOut.checkNull(expDate));
        // AVS Information
        GenericValue creditCard = null;
        if (params.get("orderPaymentPreference") != null) {
            GenericValue opp = (GenericValue) params.get("orderPaymentPreference");
            if ("CREDIT_CARD".equals(opp.getString("paymentMethodTypeId"))) {
                // sometimes the ccAuthCapture interface is used, in which case the creditCard is passed directly
                 creditCard = (GenericValue) params.get("creditCard");
                if (creditCard == null || ! (opp.get("paymentMethodId").equals(creditCard.get("paymentMethodId")))) {
                    creditCard = opp.getRelatedOne("CreditCard", false);
                }
            }

            request.setFieldValue("AVSname", "Demo Customer");
            if (UtilValidate.isNotEmpty(creditCard.getString("contactMechId"))) {
                GenericValue address = creditCard.getRelatedOne("PostalAddress", false);
                if (address != null) {
                    request.setFieldValue("AVSaddress1", UtilFormatOut.checkNull(address.getString("address1")));
                    request.setFieldValue("AVScity", UtilFormatOut.checkNull(address.getString("city")));
                    request.setFieldValue("AVSstate", UtilFormatOut.checkNull(address.getString("stateProvinceGeoId")));
                    request.setFieldValue("AVSzip", UtilFormatOut.checkNull(address.getString("postalCode")));
                }
            }
        } else {
            // this would be the case for an authorization
            GenericValue cp = (GenericValue)params.get("billToParty");
            GenericValue ba = (GenericValue)params.get("billingAddress");
            request.setFieldValue("AVSname", UtilFormatOut.checkNull(cp.getString("firstName")) + UtilFormatOut.checkNull(cp.getString("lastName")));
            request.setFieldValue("AVSaddress1", UtilFormatOut.checkNull(ba.getString("address1")));
            request.setFieldValue("AVScity", UtilFormatOut.checkNull(ba.getString("city")));
            request.setFieldValue("AVSstate", UtilFormatOut.checkNull(ba.getString("stateProvinceGeoId")));
            request.setFieldValue("AVSzip", UtilFormatOut.checkNull(ba.getString("postalCode")));
            request.setFieldValue("AVSCountryCode", UtilFormatOut.checkNull(ba.getString("countryGeoId")));
        }
        // Additional Information
        request.setFieldValue("Comments", "This is building of request object");
        String shippingRef = getShippingRefForOrder(orderId, delegator);
        request.setFieldValue("ShippingRef", shippingRef);
        request.setFieldValue("CardSecVal", UtilFormatOut.checkNull(cardSecurityCode));

        //Display the request
        if ("AUTH_ONLY".equals(transType)) {
            Debug.logInfo("\nAuth Request:\n ======== " + request.getXML());
        } else if ("AUTH_CAPTURE".equals(transType)) {
            Debug.logInfo("\nAuth Capture Request:\n ======== " + request.getXML());
        }
        results.put("processAmount", amount);
    } catch (InitializationException ie) {
        Debug.logInfo("Unable to initialize request object", module);
    } catch (FieldNotFoundException fnfe) {
        Debug.logError("Unable to find XML field in template", module);
    } catch (Exception e) {
        e.printStackTrace();
    }
}
 
开发者ID:gildaslemoal,项目名称:elpi,代码行数:81,代码来源:OrbitalPaymentServices.java


注:本文中的com.paymentech.orbital.sdk.request.FieldNotFoundException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。