亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? paymentgatewayservices.java

?? Sequoia ERP是一個真正的企業(yè)級開源ERP解決方案。它提供的模塊包括:電子商務(wù)應(yīng)用(e-commerce), POS系統(tǒng)(point of sales),知識管理,存貨與倉庫管理
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
                    processResult(dctx, captureResult, userLogin, paymentPref);                } catch (GeneralException e) {                    Debug.logError(e, "Trouble processing the result; captureResult: " + captureResult, module);                    return ServiceUtil.returnError("Trouble processing the capture results");                }                // create any splits which are needed                BigDecimal totalAmountCaptured = new BigDecimal(amountThisCapture);                if (authAmount.doubleValue() > totalAmountCaptured.doubleValue()) {                    // create a new payment preference and authorize it                    double newAmount = authAmount.doubleValue() - totalAmountCaptured.doubleValue(); // TODO: use BigDecimal arithmetic here (and everywhere else for that matter)                    Debug.logInfo("Creating payment preference split", module);                    String newPrefId = delegator.getNextSeqId("OrderPaymentPreference");                    GenericValue newPref = delegator.makeValue("OrderPaymentPreference", UtilMisc.toMap("orderPaymentPreferenceId", newPrefId));                    newPref.set("orderId", paymentPref.get("orderId"));                    newPref.set("paymentMethodTypeId", paymentPref.get("paymentMethodTypeId"));                    newPref.set("paymentMethodId", paymentPref.get("paymentMethodId"));                    newPref.set("maxAmount", paymentPref.get("maxAmount"));                    newPref.set("statusId", "PAYMENT_NOT_AUTH");                    newPref.set("createdDate", UtilDateTime.nowTimestamp());                    if (userLogin != null) {                        newPref.set("createdByUserLogin", userLogin.getString("userLoginId"));                    }                    Debug.logInfo("New preference : " + newPref, module);                    try {                        // create the new payment preference                        delegator.create(newPref);                        // authorize the new preference                        Map processorResult = authPayment(dispatcher, userLogin, orh, newPref, newAmount, false);                        if (processorResult != null) {                            // process the auth results                            boolean authResult = false;                            try {                                authResult = processResult(dctx, processorResult, userLogin, newPref);                                if (!authResult) {                                    Debug.logError("Authorization failed : " + newPref + " : " + processorResult, module);                                }                            } catch (GeneralException e) {                                Debug.logError(e, "Trouble processing the auth result : " + newPref + " : " + processorResult, module);                            }                        } else {                            Debug.logError("Payment not authorized : " + newPref + " : " + processorResult, module);                        }                    } catch (GenericEntityException e) {                        Debug.logError(e, "ERROR: cannot create new payment preference : " + newPref, module);                    }                }            } else {                Debug.logError("Payment not captured", module);                continue;            }        }        if (amountToCapture > 0.00) {            result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_SUCCESS);            result.put("processResult", "FAILED");            return result;        } else {            result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_SUCCESS);            result.put("processResult", "COMPLETE");            return result;        }    }    public static Map captureBillingAccountPayment(DispatchContext dctx, Map context) {        GenericDelegator delegator = dctx.getDelegator();        LocalDispatcher dispatcher = dctx.getDispatcher();        GenericValue userLogin = (GenericValue) context.get("userLogin");        String invoiceId = (String) context.get("invoiceId");        String billingAccountId = (String) context.get("billingAccountId");        Double captureAmount = (Double) context.get("captureAmount");        Map results = ServiceUtil.returnSuccess();                try {            // Note that the partyIdFrom of the Payment should be the partyIdTo of the invoice, since you're receiving a payment from the party you billed            GenericValue invoice = delegator.findByPrimaryKey("Invoice", UtilMisc.toMap("invoiceId", invoiceId));            Map paymentParams = UtilMisc.toMap("paymentTypeId", "CUSTOMER_PAYMENT", "paymentMethodTypeId", "EXT_BILLACT",                     "partyIdFrom", invoice.getString("partyId"), "partyIdTo", invoice.getString("partyIdFrom"),                     "statusId", "PMNT_RECEIVED", "effectiveDate", UtilDateTime.nowTimestamp());            paymentParams.put("amount", captureAmount);            paymentParams.put("currencyUomId", invoice.getString("currencyUomId"));            paymentParams.put("userLogin", userLogin);            Map tmpResult = dispatcher.runSync("createPayment", paymentParams);            if (ServiceUtil.isError(tmpResult)) {                return tmpResult;            }                         String paymentId = (String) tmpResult.get("paymentId");            tmpResult = dispatcher.runSync("createPaymentApplication", UtilMisc.toMap("paymentId", paymentId, "invoiceId", invoiceId, "billingAccountId", billingAccountId,                     "amountApplied", captureAmount, "userLogin", userLogin));            if (ServiceUtil.isError(tmpResult)) {                return tmpResult;            }            if (paymentId == null) {                return ServiceUtil.returnError("No payment created for invoice [" + invoiceId + "] and billing account [" + billingAccountId + "]");            }            results.put("paymentId", paymentId);        } catch (GenericEntityException ex) {            return ServiceUtil.returnError(ex.getMessage());        } catch (GenericServiceException ex) {            return ServiceUtil.returnError(ex.getMessage());        }        return results;    }        private static Map capturePayment(DispatchContext dctx, GenericValue userLogin, OrderReadHelper orh, GenericValue paymentPref, double amount) {    	return capturePayment(dctx, userLogin, orh, paymentPref, amount, null);    }    private static Map capturePayment(DispatchContext dctx, GenericValue userLogin, OrderReadHelper orh, GenericValue paymentPref, double amount, GenericValue authTrans) {        LocalDispatcher dispatcher = dctx.getDispatcher();        // look up the payment configuration settings        String serviceName = null;        String paymentConfig = null;        // get the payment settings i.e. serviceName and config properties file name        GenericValue paymentSettings = getPaymentSettings(orh.getOrderHeader(), paymentPref, CAPTURE_SERVICE_TYPE, false);        if (paymentSettings != null) {            paymentConfig = paymentSettings.getString("paymentPropertiesPath");            serviceName = paymentSettings.getString("paymentService");            if (serviceName == null) {                Debug.logError("Service name is null for payment setting; cannot process", module);                return null;            }        } else {            Debug.logError("Invalid payment settings entity, no payment settings found", module);            return null;        }        if (paymentConfig == null || paymentConfig.length() == 0) {            paymentConfig = "payment.properties";        }        // check the validity of the authorization; re-auth if necessary        if (!PaymentGatewayServices.checkAuthValidity(paymentPref, paymentConfig)) {            // re-auth required before capture            Map processorResult = PaymentGatewayServices.authPayment(dispatcher, userLogin, orh, paymentPref, amount, true);            boolean authResult = false;            if (processorResult != null) {                // process the auth results                try {                    authResult = processResult(dctx, processorResult, userLogin, paymentPref);                    if (!authResult) {                        Debug.logError("Re-Authorization failed : " + paymentPref + " : " + processorResult, module);                    }                } catch (GeneralException e) {                    Debug.logError(e, "Trouble processing the re-auth result : " + paymentPref + " : " + processorResult, module);                }            } else {                Debug.logError("Payment not re-authorized : " + paymentPref + " : " + processorResult, module);            }            if (!authResult) {                // returning null to cancel the capture process.                return null;            }            // get the new auth transaction            authTrans = getAuthTransaction(paymentPref);        }        // prepare the context for the capture service (must follow the ccCaptureInterface        Map captureContext = new HashMap();        captureContext.put("userLogin", userLogin);        captureContext.put("orderPaymentPreference", paymentPref);        captureContext.put("paymentConfig", paymentConfig);        captureContext.put("currency", orh.getCurrency());        // this is necessary because the ccCaptureInterface uses "captureAmount" but the paymentProcessInterface uses "processAmount"        try {            ModelService captureService = dctx.getModelService(serviceName);            Set inParams = captureService.getInParamNames();            if (inParams.contains("captureAmount")) {                captureContext.put("captureAmount", new Double(amount));                } else if (inParams.contains("processAmount")) {                captureContext.put("processAmount", new Double(amount));                } else {                return ServiceUtil.returnError("Service [" + serviceName + "] does not have a captureAmount or processAmount.  Its parameters are: " + inParams);            }        } catch (GenericServiceException ex) {            return ServiceUtil.returnError("Cannot get model service for " + serviceName);        }                        if (authTrans != null) {            captureContext.put("authTrans", authTrans);        }        Debug.logInfo("Capture [" + serviceName + "] : " + captureContext, module);        // now invoke the capture service        Map captureResult = null;        try {            captureResult = dispatcher.runSync(serviceName, captureContext, TX_TIME, true);        } catch (GenericServiceException e) {            Debug.logError(e, "Could not capture payment ... serviceName: " + serviceName + " ... context: " + captureContext, module);            return null;        }        // pass the payTo partyId to the result processor; we just add it to the result context.        String payToPartyId = getPayToPartyId(orh.getOrderHeader());        captureResult.put("payToPartyId", payToPartyId);        // add paymentSettings to result; for use by later processors        captureResult.put("paymentSettings", paymentSettings);        // pass the currencyUomId as well        captureResult.put("currencyUomId", orh.getCurrency());        // log the error message as a gateway response when it fails        if (ServiceUtil.isError(captureResult)) {            saveError(dispatcher, userLogin, paymentPref, captureResult, "PRDS_PAY_CAPTURE", "PGT_CAPTURE");        }        return captureResult;    }    private static void saveError(LocalDispatcher dispatcher, GenericValue userLogin, GenericValue paymentPref, Map result, String serviceType, String transactionCode) {        Map serviceContext = new HashMap();        serviceContext.put("paymentServiceTypeEnumId", serviceType);        serviceContext.put("orderPaymentPreference", paymentPref);        serviceContext.put("transCodeEnumId", transactionCode);        serviceContext.put("serviceResultMap", result);        serviceContext.put("userLogin", userLogin);        try {            dispatcher.runAsync("processPaymentServiceError", serviceContext);        } catch (GenericServiceException e) {            Debug.logError(e, module);        }    }    public static Map storePaymentErrorMessage(DispatchContext dctx, Map context) {        GenericDelegator delegator = dctx.getDelegator();        GenericValue paymentPref = (GenericValue) context.get("orderPaymentPreference");        String serviceType = (String) context.get("paymentServiceTypeEnumId");        String transactionCode = (String) context.get("transCodeEnumId");        Map result = (Map) context.get("serviceResultMap");        String responseId = delegator.getNextSeqId("PaymentGatewayResponse");        GenericValue response = delegator.makeValue("PaymentGatewayResponse", null);        response.set("paymentGatewayResponseId", responseId);        response.set("paymentServiceTypeEnumId", serviceType);        response.set("orderPaymentPreferenceId", paymentPref.get("orderPaymentPreferenceId"));        response.set("paymentMethodTypeId", paymentPref.get("paymentMethodTypeId"));        response.set("paymentMethodId", paymentPref.get("paymentMethodId"));        response.set("transCodeEnumId", transactionCode);        response.set("referenceNum", "ERROR");        response.set("gatewayMessage", ServiceUtil.getErrorMessage(

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区三区视频在线播放| 91免费在线播放| 日本少妇一区二区| 亚洲精品成人悠悠色影视| 日本一区二区三区四区| 日韩一区二区三区四区| kk眼镜猥琐国模调教系列一区二区| 国产成人精品一区二区三区四区 | 一区二区三区四区五区视频在线观看 | 欧美日韩一区高清| 91麻豆6部合集magnet| 懂色av中文一区二区三区| 国产成人亚洲精品青草天美 | 波波电影院一区二区三区| 久久99精品久久久久久国产越南| 久久99国产精品成人| 六月婷婷色综合| 91官网在线免费观看| 91麻豆免费看| 色综合色狠狠天天综合色| 国产精品99久久久久| 波多野结衣中文一区| 福利一区二区在线| 成人免费av网站| 色综合天天狠狠| 在线免费观看日本欧美| 日本久久电影网| 欧美日韩夫妻久久| 日韩精品中文字幕在线不卡尤物| 日韩欧美国产综合| 国产欧美一区二区在线| 国产精品私房写真福利视频| 国产精品入口麻豆原神| 一区二区三区精品在线| 亚洲高清一区二区三区| 亚洲大片精品永久免费| 国内精品国产成人| 99久久精品国产麻豆演员表| 色婷婷国产精品| 日韩一区二区视频| 久久久国产精品麻豆| 国产精品视频免费| 日韩在线一区二区| 国产一区二区网址| av电影在线观看一区| 欧美日韩精品系列| 26uuu另类欧美亚洲曰本| 国产精品色哟哟网站| 视频一区在线播放| 激情另类小说区图片区视频区| 不卡欧美aaaaa| 日韩一卡二卡三卡国产欧美| 久久青草国产手机看片福利盒子 | 日韩一二在线观看| 日韩精品一区二区三区老鸭窝| 久久亚洲一区二区三区四区| 亚洲伊人色欲综合网| 麻豆传媒一区二区三区| 国产69精品久久777的优势| 欧美一区二区视频在线观看| 久久中文娱乐网| 玉足女爽爽91| 午夜精品久久久久久不卡8050| 精品一区二区三区日韩| 在线观看免费一区| 精品国产一区二区三区久久久蜜月 | aaa欧美色吧激情视频| 欧美日韩另类一区| 欧美xxxxx牲另类人与| 亚洲一卡二卡三卡四卡五卡| 精品一区二区久久久| 国产精品2024| 日韩一卡二卡三卡| 亚洲欧美国产77777| 午夜精品国产更新| 99国产精品一区| 久久先锋影音av鲁色资源网| 亚洲视频一区在线观看| 国产综合色产在线精品| 欧美综合一区二区| 欧美精品一区二区三区四区 | 99热99精品| 欧美一卡二卡三卡四卡| 亚洲一区二区三区四区的| 国产精品99久久久久久似苏梦涵 | 亚洲欧洲av另类| 免费黄网站欧美| 欧美婷婷六月丁香综合色| 国产免费观看久久| 国产精品一区不卡| 日韩欧美国产午夜精品| 国产大陆精品国产| 精品国产乱码久久久久久牛牛| 夜夜嗨av一区二区三区| 成人av免费网站| 国产精品黄色在线观看| 国产一区不卡视频| 欧美日韩精品电影| 亚洲一区日韩精品中文字幕| 不卡一二三区首页| 欧美肥胖老妇做爰| 五月天精品一区二区三区| 日本道免费精品一区二区三区| 26uuu欧美日本| 国产精品正在播放| 日韩欧美国产麻豆| 亚洲成人激情综合网| 欧美日韩在线三区| 亚洲黄色免费电影| 成人av网址在线观看| 国产精品久久久久久久久图文区| 国产不卡高清在线观看视频| 久久久久久久久久久久久久久99| 免费观看久久久4p| 欧美一区欧美二区| 一级中文字幕一区二区| 色婷婷一区二区| 一区二区三区四区在线| 欧美日韩美少妇| 丝袜脚交一区二区| 色婷婷国产精品久久包臀| 亚洲bt欧美bt精品777| 欧美日韩一区二区三区在线| 自拍偷拍亚洲综合| 一本色道久久综合精品竹菊| 一区二区三区四区乱视频| 欧美性欧美巨大黑白大战| 亚洲一区二区成人在线观看| 91行情网站电视在线观看高清版| 午夜精品免费在线| 欧美丰满少妇xxxbbb| 日韩高清电影一区| 久久久国际精品| 福利一区二区在线| 亚洲天堂中文字幕| 国产精品色哟哟| 91视视频在线直接观看在线看网页在线看| 国产精品福利一区| 欧美日韩国产精选| 美女一区二区三区| 精品粉嫩aⅴ一区二区三区四区| 成人性视频免费网站| 中文字幕日韩av资源站| 欧美视频中文一区二区三区在线观看| 亚洲超碰精品一区二区| 欧美一区二区三区系列电影| 精品亚洲porn| 国产精品女人毛片| 91久久线看在观草草青青| 美女任你摸久久| 欧美激情一区二区在线| 色婷婷av一区二区三区gif| 精品影视av免费| 综合亚洲深深色噜噜狠狠网站| 色婷婷亚洲一区二区三区| 精品午夜久久福利影院| 中文字幕一区在线观看视频| 91尤物视频在线观看| 天堂va蜜桃一区二区三区漫画版| 26uuu精品一区二区| 一本一道波多野结衣一区二区 | 国产乱码精品一区二区三| 国产精品丝袜黑色高跟| 欧美日韩一区 二区 三区 久久精品| 免费观看日韩电影| 国产精品视频一二三| 91精品国产综合久久久久久久| 国产大陆a不卡| 免费精品视频在线| 亚洲私人黄色宅男| 日韩精品在线看片z| 欧美天堂一区二区三区| 国产精品91一区二区| 亚洲男人的天堂在线aⅴ视频 | 亚洲一区二区欧美| 日韩视频免费观看高清完整版在线观看 | 国产清纯在线一区二区www| 在线播放91灌醉迷j高跟美女 | ...中文天堂在线一区| 日本精品一区二区三区高清| 国产v日产∨综合v精品视频| 亚洲电影你懂得| 欧美精品一区二区在线播放| 91精品国产一区二区三区蜜臀| av一区二区久久| 天天色综合成人网| 一区二区日韩av| 日本一区二区视频在线| 欧美亚洲国产一卡| 波多野结衣一区二区三区| 青娱乐精品视频在线| 一区二区三区不卡在线观看| 日韩理论片网站| 亚洲欧洲无码一区二区三区| 国产区在线观看成人精品| 2023国产精华国产精品| 日韩精品一区二区三区老鸭窝 | 国产精品久久午夜| 国产欧美精品一区二区三区四区| 精品99999|