创建供APP调用的签名
@param prepayId
@return
191206
public Signature createAppSignature(String prepayId) {
        String pack = "Sign=WXPay";

        long timestamp = System.currentTimeMillis() / 1000;
        String nonce = RandomStringGenerator.getRandomStringByLength(16);
        String appId = paySetting.getAppId();
        String mchId = paySetting.getMchId();
        String key = paySetting.getKey();

        String sortString = String.format("appId=%s&nonceStr=%s&package=%s&partnerid=%s&&prepayid=%s&timeStamp=%s",
                appId, nonce, pack, mchId, prepayId, timestamp);

        return createSignature(pack, timestamp, nonce, appId, key, sortString);
    }
841708
public function jsapiParams($prepayId)
    {
        $option = [];
        $option["appId"] = $this->config->get('appid');
        $option["timeStamp"] = (string)time();
        $option["nonceStr"] = Tools::createNoncestr();
        $option["package"] = "prepay_id={$prepayId}";
        $option["signType"] = "MD5";
        $option["paySign"] = $this->getPaySign($option, 'MD5');
        $option['timestamp'] = $option['timeStamp'];
        return $option;
    }
1317420
def get_jsapi_signature(self, prepay_id, timestamp=None, nonce_str=None):
        
        data = {
            'appId': self.sub_appid or self.appid,
            'timeStamp': timestamp or to_text(int(time.time())),
            'nonceStr': nonce_str or random_string(32),
            'signType': 'MD5',
            'package': 'prepay_id={0}'.format(prepay_id),
        }
        return calculate_signature(
            data,
            self._client.api_key if not self._client.sandbox else self._client.sandbox_api_key
        )
36956
public Optional<Application> show(long applicationId)
    {
        return HTTP.GET(String.format("/v2/applications/%d.json", applicationId), APPLICATION);
    }
210079
public KNNList get(DBIDRef id) {
    if(storage == null) {
      if(getLogger().isDebugging()) {
        getLogger().debug("Running kNN preprocessor: " + this.getClass());
      }
      preprocess();
    }
    return storage.get(id);
  }
701821
@Override
    public Set<AppdynamicsApplication> getApplications(String instanceUrl) {
        Set<AppdynamicsApplication> returnSet = new HashSet<>();
        try {
            String url = joinURL(instanceUrl, APPLICATION_LIST_PATH);
            ResponseEntity<String> responseEntity = makeRestCall(url);
            String returnJSON = responseEntity.getBody();
            JSONParser parser = new JSONParser();

            try {
                JSONArray array = (JSONArray) parser.parse(returnJSON);

                for (Object entry : array) {
                    JSONObject jsonEntry = (JSONObject) entry;

                    String appName = getString(jsonEntry, "name");
                    String appId = String.valueOf(getLong(jsonEntry, "id"));
                    String desc = getString(jsonEntry, "description");
                    if (StringUtils.isEmpty(desc)) {
                        desc = appName;
                    }
                    AppdynamicsApplication app = new AppdynamicsApplication();
                    app.setAppID(appId);
                    app.setAppName(appName);
                    app.setAppDesc(desc);
                    app.setDescription(desc);
                    returnSet.add(app);
                }
            } catch (ParseException e) {
                LOG.error("Parsing applications on instance: " + instanceUrl, e);
            }
        } catch (RestClientException rce) {
            LOG.error("client exception loading applications", rce);
            throw rce;
        } catch (MalformedURLException mfe) {
            LOG.error("malformed url for loading applications", mfe);
        }
        return returnSet;
    }
896660
public function createParamsForJsApi($prepay_id)
    {
        $pay = new Order($this->config->get());
        return $pay->jsapiParams($prepay_id);
    }
137341
protected String getAppName() {
        if (appName == null && FrameworkUtil.isInitialized()) {
            setAppName(FrameworkUtil.getAppName());
        }
        
        return appName;
    }
845076
public String getNamefromId(int id) {
        return (String) sqlService.getFromTable(
            Constants.PROFILE_PROFILE_NAME, Constants.GENERIC_ID,
            id, Constants.DB_TABLE_PROFILE);
    }
806627
public byte[] getPQCodeByte(String id) throws Exception {
		int iid = getInternalId(id);
		if (iid == -1) {
			throw new Exception("Id does not exist!");
		}
		if (numProductCentroids > 256) {
			throw new Exception("Call the short variant of the method!");
		}

		DatabaseEntry key = new DatabaseEntry();
		IntegerBinding.intToEntry(iid, key);
		DatabaseEntry data = new DatabaseEntry();
		if ((iidToIvfpqDB.get(null, key, data, null) == OperationStatus.SUCCESS)) {
			TupleInput input = TupleBinding.entryToInput(data);
			input.readInt(); // skip the list id
			byte[] code = new byte[numSubVectors];
			for (int i = 0; i < numSubVectors; i++) {
				code[i] = input.readByte();
			}
			return code;
		} else {
			throw new Exception("Id does not exist!");
		}
	}
1319294
public function configForAppPayment($prepayId)
    {
        $params = [
            'appid'     => $this->merchant->app_id,
            'partnerid' => $this->merchant->merchant_id,
            'prepayid'  => $prepayId,
            'noncestr'  => uniqid(),
            'timestamp' => time(),
            'package'   => 'Sign=WXPay',
        ];

        $params['sign'] = generate_sign($params, $this->merchant->key);

        return $params;
    }
1192711
public OvhApplication api_application_applicationId_GET(Long applicationId) throws IOException {
		String qPath = "/me/api/application/{applicationId}";
		StringBuilder sb = path(qPath, applicationId);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhApplication.class);
	}
1331958
public ApiApp getApiApp(String clientId) throws HelloSignException {
        String url = BASE_URI + API_APP_URI + "/" + clientId;
        return new ApiApp(httpClient.withAuth(auth).get(url).asJson());
    }
278389
public static String getAppWorkDirPath(String applicationName, String applicationId) {
    return applicationName + Path.SEPARATOR + applicationId;
  }
597107
public Application getRegisteredApplications(String appName) {
        return appNameApplicationMap.get(appName.toUpperCase(Locale.ROOT));
    }
747239
@Override
	public byte[] getAppIdFloor(String appId) {

		int appIdCode = codecer.findId(APP_ID, appId).intValue();
		ByteBuffer byteBuffer = ByteBuffer.allocate(12);
		putUnsignedShort(byteBuffer, appIdCode);
		putUnsignedShort(byteBuffer, 0);
		putUnsignedShort(byteBuffer, 0);
		putUnsignedShort(byteBuffer, 0);
		putUnsignedShort(byteBuffer, 0);
		putUnsignedShort(byteBuffer, 0);
		
		return byteBuffer.array();
	}
697649
public Observable<ServiceResponse<ApplicationSettings>> getSettingsWithServiceResponseAsync(UUID appId) {
        if (this.client.endpoint() == null) {
            throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");
        }
        if (appId == null) {
            throw new IllegalArgumentException("Parameter appId is required and cannot be null.");
        }
        String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
        return service.getSettings(appId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ApplicationSettings>>>() {
                @Override
                public Observable<ServiceResponse<ApplicationSettings>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<ApplicationSettings> clientResponse = getSettingsDelegate(response);
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }