WEB支付
@param webPayDetail 支付字段信息
@return 自动提交表单(可直接输出到浏览器)
771271
public String webPay(WebPayDetail webPayDetail){
        Map<String, String> payParams = buildWebPayParams(webPayDetail);
        return buildPayForm(payParams);
    }
107099
public static String getStringForSign(ProductPayRequest request) {
        Map<String, Object>  params = new HashMap<String, Object>();

        // 必选参数
        params.put(HwPayConstant.KEY_MERCHANTID, request.getMerchantId());
        params.put(HwPayConstant.KEY_APPLICATIONID, request.getApplicationID());
        params.put(HwPayConstant.KEY_PRODUCT_NO, request.getProductNo());
        params.put(HwPayConstant.KEY_REQUESTID, request.getRequestId());
        params.put(HwPayConstant.KEY_SDKCHANNEL, request.getSdkChannel());

        // 可选参数
        params.put(HwPayConstant.KEY_URL, request.getUrl());
        params.put(HwPayConstant.KEY_URLVER, request.getUrlVer());

        return getNoSign(params, false);
    }
1057904
public static Collection<URL> forWebInfLib(final ServletContext servletContext) {
        final Collection<URL> urls = new ArrayList<URL>();
        Set<?> resourcePaths = servletContext.getResourcePaths("/WEB-INF/lib");
        if (resourcePaths == null) {
            return urls;
        }
        for (Object urlString : resourcePaths) {
            try {
                urls.add(servletContext.getResource((String) urlString));
            } catch (MalformedURLException e) { /*fuck off*/ }
        }
        return distinctUrls(urls);
    }
755289
public static CmsContainerPageBean getDetailOnlyPage(CmsObject cms, ServletRequest req, String pageRootPath) {

        CmsJspStandardContextBean standardContext = CmsJspStandardContextBean.getInstance(req);
        CmsContainerPageBean detailOnlyPage = standardContext.getDetailOnlyPage();
        if (standardContext.isDetailRequest() && (detailOnlyPage == null)) {

            try {
                CmsObject rootCms = OpenCms.initCmsObject(cms);
                rootCms.getRequestContext().setSiteRoot("");
                String locale = getDetailContainerLocale(
                    cms,
                    cms.getRequestContext().getLocale().toString(),
                    cms.readResource(cms.getRequestContext().getUri()));

                String resourceName = getDetailOnlyPageNameWithoutLocaleCheck(
                    standardContext.getDetailContent().getRootPath(),
                    locale);
                CmsResource resource = null;
                if (rootCms.existsResource(resourceName)) {
                    resource = rootCms.readResource(resourceName);
                } else {
                    // check if the deprecated locale independent detail container page exists
                    resourceName = getDetailOnlyPageNameWithoutLocaleCheck(
                        standardContext.getDetailContent().getRootPath(),
                        null);
                    if (rootCms.existsResource(resourceName)) {
                        resource = rootCms.readResource(resourceName);
                    }
                }

                CmsXmlContainerPage xmlContainerPage = null;
                if (resource != null) {
                    xmlContainerPage = CmsXmlContainerPageFactory.unmarshal(rootCms, resource, req);
                }
                if (xmlContainerPage != null) {
                    detailOnlyPage = xmlContainerPage.getContainerPage(rootCms);
                    detailOnlyPage = CmsTemplateMapper.get(req).transformContainerpageBean(
                        rootCms,
                        detailOnlyPage,
                        pageRootPath);
                    standardContext.setDetailOnlyPage(detailOnlyPage);
                }
            } catch (CmsException e) {
                LOG.error(e.getLocalizedMessage(), e);
            }
        }
        return detailOnlyPage;
    }
257060
private ExtractResult extractHtmlTemplate(String url, HtmlTemplate htmlTemplate, Document doc) {
        //一个页面模板对应一个抽取结果
        ExtractResult extractResult = new ExtractResult();
        extractResult.setUrl(url);
        extractResult.setTableName(htmlTemplate.getTableName());
        List<CssPath> cssPaths = htmlTemplate.getCssPaths();
	    //页面模板中定义的所有CSS路径和抽取表达式全部抽取成功，才算抽取成功
        //只要有一个CSS路径或抽取表达式失败，就是抽取失败
        for (CssPath cssPath : cssPaths) {
            // 抽取一条CSS PATH
            Elements elements = doc.select(cssPath.getCssPath());
            // 如果CSS路径匹配多个元素，则抽取字段为多值
            for (Element element : elements) {
                String text = null;
                if(StringUtils.isBlank(cssPath.getAttr())){
                    //提取文本
                    text = element.text();
                }else{
                    //提取属性
                    text = element.attr(cssPath.getAttr());
                }
                if (StringUtils.isNotBlank(text)) {
                    // 成功提取文本
                    if (cssPath.hasExtractFunction()) {
                        //使用CSS路径下的抽取函数做进一步抽取
                        for (ExtractFunction pf : cssPath.getExtractFunctions()) {
                            text = ExtractFunctionExecutor.execute(text, doc, cssPath, pf.getExtractExpression());
                            if (text != null) {
                                ExtractResultItem extractResultItem = new ExtractResultItem();
                                extractResultItem.setField(pf.getFieldName());
                                extractResultItem.setValue(text);
                                extractResult.addExtractResultItem(extractResultItem);
                            } else {
                                ExtractFailLog extractFailLog = new ExtractFailLog();
                                extractFailLog.setUrl(url);
                                extractFailLog.setUrlPattern(htmlTemplate.getUrlPattern().getUrlPattern());
                                extractFailLog.setTemplateName(htmlTemplate.getTemplateName());
                                extractFailLog.setCssPath(cssPath.getCssPath());
                                extractFailLog.setExtractExpression(pf.getExtractExpression());
                                extractFailLog.setTableName(htmlTemplate.getTableName());
                                extractFailLog.setFieldName(pf.getFieldName());
                                extractFailLog.setFieldDescription(pf.getFieldDescription());
                                extractResult.addExtractFailLog(extractFailLog);
                                //未抽取到结果，保存抽取失败日志并停止抽取，抽取失败
                                //快速失败模式
                                //如果要记录所有失败日志，则去除下面一行返回的代码
                                return extractResult;
                            }
                        }
                    } else {
                        //使用CSS路径抽取的结果
                        ExtractResultItem extractResultItem = new ExtractResultItem();
                        extractResultItem.setField(cssPath.getFieldName());
                        extractResultItem.setValue(text);
                        extractResult.addExtractResultItem(extractResultItem);
                    }
                } else {
                    //未抽取到结果，保存抽取失败日志并停止抽取，抽取失败
                    ExtractFailLog extractFailLog = new ExtractFailLog();
                    extractFailLog.setUrl(url);
                    extractFailLog.setUrlPattern(htmlTemplate.getUrlPattern().getUrlPattern());
                    extractFailLog.setTemplateName(htmlTemplate.getTemplateName());
                    extractFailLog.setCssPath(cssPath.getCssPath());
                    extractFailLog.setExtractExpression("");
                    extractFailLog.setTableName(htmlTemplate.getTableName());
                    extractFailLog.setFieldName(cssPath.getFieldName());
                    extractFailLog.setFieldDescription(cssPath.getFieldDescription());
                    extractResult.addExtractFailLog(extractFailLog);
                    //未抽取到结果，保存抽取失败日志并停止抽取，抽取失败
                    //快速失败模式
                    //如果要记录所有失败日志，则去除下面一行返回的代码
                    return extractResult;
                }
            }
        }
        return extractResult;
    }
1344975
public static function getWebhookPayload($returnObject = false) {
        $data = file_get_contents("php://input");
        if ($data) {
            return self::jsonDecode($data, !$returnObject);
        } else {
            return null;
        }
    }
665336
@Override
    public Taxinvoice getDetailInfo(String CorpNum, MgtKeyType KeyType,
                                    String MgtKey) throws PopbillException {
        if (KeyType == null)
            throw new PopbillException(-99999999, "관리번호형태가 입력되지 않았습니다.");
        if (MgtKey == null || MgtKey.isEmpty())
            throw new PopbillException(-99999999, "관리번호가 입력되지 않았습니다.");

        return httpget("/Taxinvoice/" + KeyType.name() + "/" + MgtKey
                + "?Detail", CorpNum, null, Taxinvoice.class);
    }
650273
private int getAndUpdateTail() {
        int retMe;

        do {
            retMe = tailIndex.get();
        } while (tailIndex.compareAndSet(retMe, getNext(retMe)) == false);

        return retMe;
    }
544912
@Override
    public int doEndTag() throws JspException {

        ServletRequest req = pageContext.getRequest();

        // This will always be true if the page is called through OpenCms
        if (CmsFlexController.isCmsRequest(req)) {
            try {
                // Get link-string from the body and reset body
                String link = getBodyContent().getString();
                getBodyContent().clear();
                // Calculate the link substitution
                String newlink = linkTagAction(link, req, getBaseUri(), getDetailPage(), m_locale);
                // Write the result back to the page
                getBodyContent().print(newlink);
                getBodyContent().writeOut(pageContext.getOut());

            } catch (Exception ex) {
                if (LOG.isErrorEnabled()) {
                    LOG.error(Messages.get().getBundle().key(Messages.ERR_PROCESS_TAG_1, "link"), ex);
                }
                throw new JspException(ex);
            }
        }
        return EVAL_PAGE;
    }
633501
def webhooks(request):
    

    if request.method != "POST":
        return HttpResponse("Invalid Request.", status=400)

    json = simplejson.loads(request.POST["json"])

    if json["event"] == "recurring_payment_failed":
        zebra_webhook_recurring_payment_failed.send(sender=None, customer=_try_to_get_customer_from_customer_id(json["customer"]), full_json=json)

    elif json["event"] == "invoice_ready":
        zebra_webhook_invoice_ready.send(sender=None, customer=_try_to_get_customer_from_customer_id(json["customer"]), full_json=json)

    elif json["event"] == "recurring_payment_succeeded":
        zebra_webhook_recurring_payment_succeeded.send(sender=None, customer=_try_to_get_customer_from_customer_id(json["customer"]), full_json=json)

    elif json["event"] == "subscription_trial_ending":
        zebra_webhook_subscription_trial_ending.send(sender=None, customer=_try_to_get_customer_from_customer_id(json["customer"]), full_json=json)

    elif json["event"] == "subscription_final_payment_attempt_failed":
        zebra_webhook_subscription_final_payment_attempt_failed.send(sender=None, customer=_try_to_get_customer_from_customer_id(json["customer"]), full_json=json)

    elif json["event"] == "ping":
        zebra_webhook_subscription_ping_sent.send(sender=None)

    else:
        return HttpResponse(status=400)

    return HttpResponse(status=200)
806725
@RequestMapping(value = "/site/**")
	public Object site(HttpServletRequest req, HttpServletResponse resp, AuthorizationEngine ap,
			PsnRuleEngine psnEngine, @RequestHeader(value = "X-Url-Prefix", required = false) String urlPrefix) {
		String path = req.getServletPath().substring(5);

		try {
			Branch branch = getBranch(ap, getContextRoot(req));
			if (branch == null) {
				return pageNotFound;
			}

			if (branch.isStatic()) { // 静态分支，直接返回要访问的资源
				if (path.equals("/cfg.cfg")) // 不允许访问cfg.cfg
					path = "";

				return returnFile(branch, path);
			} else {
				Page page = branch.findPage(path, ap);
				if (page == null)
					return pageNotFound;

				if (page.getLink() != null)
					return "redirect:" + page.getLink();

				if (page.isStatic()) {
					if (path.equals(page.getFullPath() + "cfg.cfg")) // 不允许访问cfg.cfg
						return pageNotFound;

					return returnFile(branch, path.replace(page.getFullPath(), page.getFullDir()));
				} else {
					SiteContext sc = new SiteContext(req, page, urlPrefix);
					req.setAttribute(SiteContext.SITE_CONTEXT_KEY, sc);
					req.setAttribute(PAGE_PATH, sc.getPageUrl(page.getFullPath()));
					req.setAttribute(PAGE_DATA, page.getDataMap());
					if (page.isExpand() && !page.getFullPath().equals(path) && path.startsWith(page.getFullPath()))
						req.setAttribute(PATH_EXPAND, path.substring(page.getFullPath().length()));

					return isSpringBoot ? "/WEB-INF/templates/" + page.getPsnTemplate(psnEngine) + ".jsp"
							: "/WEB-INF/site/template/" + page.getPsnTemplate(psnEngine) + ".jsp";
				}
			}
		} catch (Exception e) {
			return pageNotFound;
		}
	}
1191152
@SuppressWarnings("unused")
    @Override
    public void onPaymentSuccess(String razorpayPaymentID) {
        try {
            Toast.makeText(this, "Payment Successful: " + razorpayPaymentID, Toast.LENGTH_SHORT).show();
        } catch (Exception e) {
            Log.e(TAG, "Exception in onPaymentSuccess", e);
        }
    }
1307875
public static String generatePapayH5EntrustwebURL(PapayEntrustweb papayEntrustweb, String key) {
		PapayH5entrustwebResult result = PayMchAPI.papayH5entrustweb(papayEntrustweb, key);
		if (result != null && "SUCCESS".equals(result.getResult_code())) {
			return result.getRedirect_url();
		}
		return null;
	}
168873
private String getRequestUrl(RequestParametersHolder requestHolder) throws AlipayApiException {
        StringBuffer urlSb = new StringBuffer(serverUrl);
        try {
            String sysMustQuery = WebUtils.buildQuery(requestHolder.getProtocalMustParams(),
                charset);
            String sysOptQuery = WebUtils.buildQuery(requestHolder.getProtocalOptParams(), charset);

            urlSb.append("?");
            urlSb.append(sysMustQuery);
            if (sysOptQuery != null & sysOptQuery.length() > 0) {
                urlSb.append("&");
                urlSb.append(sysOptQuery);
            }
        } catch (IOException e) {
            throw new AlipayApiException(e);
        }

        return urlSb.toString();
    }
770238
protected String getTemplateUrl() {
        return "web/" + getClass().getPackage().getName().replace(".", "/") + "/"
                + StringUtils.uncapitalize(getClass().getSimpleName()) + ".fsp";
    }
260330
public static WebhookEndpoint retrieve(String webhookEndpoint) throws StripeException {
    return retrieve(webhookEndpoint, (Map<String, Object>) null, (RequestOptions) null);
  }
1267085
private Map<String, String> buildPayParams(PayRequest request, TradeType tradeType) {
        Map<String, String> payParams = new TreeMap<>();

        // 配置参数
        buildConfigParams(payParams);

        // 业务必需参数
        put(payParams, WepayField.BODY, request.getBody());
        put(payParams, WepayField.OUT_TRADE_NO, request.getOutTradeNo());
        put(payParams, WepayField.TOTAL_FEE, request.getTotalFee() + "");
        put(payParams, WepayField.SPBILL_CREATE_IP, request.getClientIp());
        put(payParams, WepayField.NOTIFY_URL, request.getNotifyUrl());
        put(payParams, WepayField.FEE_TYPE, request.getFeeType().type());
        put(payParams, WepayField.NONCE_STR, RandomStrs.generate(16));
        put(payParams, WepayField.TIME_START, request.getTimeStart());
        put(payParams, WepayField.TRADE_TYPE, tradeType.type());

        // 业务可选参数
        putIfNotEmpty(payParams, WepayField.DEVICE_INFO, request.getDeviceInfo());
        putIfNotEmpty(payParams, WepayField.ATTACH, request.getAttach());
        putIfNotEmpty(payParams, WepayField.DETAIL, request.getDetail());
        putIfNotEmpty(payParams, WepayField.GOODS_TAG, request.getGoodsTag());
        putIfNotEmpty(payParams, WepayField.TIME_EXPIRE, request.getTimeExpire());
        putIfNotEmpty(payParams, WepayField.LIMIT_PAY, request.getLimitPay());

        return payParams;
    }