Verify the chargeback ID and retrieve the chargeback from the API.
347805
def get(self, chargeback_id, **params):
        """"""
        if not chargeback_id or not chargeback_id.startswith(self.RESOURCE_ID_PREFIX):
            raise IdentifierError(
                "Invalid chargeback ID: '{id}'. A chargeback ID should start with '{prefix}'.".format(
                    id=chargeback_id, prefix=self.RESOURCE_ID_PREFIX)
            )
        return super(Chargebacks, self).get(chargeback_id, **params)
564193
def extract_payload(self, request, verify=True, *args, **kwargs):
        
        payload = self._verify(
            request, return_payload=True, verify=verify, *args, **kwargs
        )
        return payload
789985
def verify_response(self, response_json, signed_id_name='transactionid'):
        
        auth_json = response_json.get('auth', {})

        nonce = auth_json.get('nonce', '')
        timestamp = auth_json.get('timestamp', '')
        signature = binascii.unhexlify(auth_json.get('signature', ''))

        signed_id = response_json.get(signed_id_name, '')

        return self.verify_signature(signature=signature, nonce=nonce, timestamp=timestamp, signed_id=signed_id)
562468
def _verify_auth(self):
        '''
        
        '''

        return self.token and bool(self.application.auth.get_tok(self.token))
230795
def load_verifying_key(verifying_key, crypto_backend=default_backend()):
    
    if not isinstance(crypto_backend, (Backend, MultiBackend)):
        raise ValueError('backend must be a valid Backend object')

    if isinstance(verifying_key, EllipticCurvePublicKey):
        return verifying_key
    elif isinstance(verifying_key, (str, unicode)):
        try:
            return load_der_public_key(
                verifying_key, backend=crypto_backend)
        except:
            try:
                return load_pem_public_key(
                    verifying_key, backend=crypto_backend)
            except Exception:
                raise ValueError('Invalid verifying key format')
    else:
        raise ValueError('Invalid verification key type')
378575
public function getChargeHistory($chargeId)
	{


		$requestPayload = array (
			'authorization' => $this->_apiSetting->getSecretKey(),
			'mode'          => $this->_apiSetting->getMode(),
			'method'         => 'GET',
		);

		$retrieveChargeHistoryWithChargeUri = sprintf ($this->_apiUrl->getRetrieveChargeHistoryApiUri(),$chargeId);

		$processCharge = \com\checkout\helpers\ApiHttpClient::getRequest($retrieveChargeHistoryWithChargeUri,
			$this->_apiSetting->getSecretKey(),$requestPayload);

		$responseModel = new ResponseModels\ChargeHistory($processCharge);
		return $responseModel;
	}
1099645
def verify(self):
        
        self.response = self._postback().decode('ascii')
        self.clear_flag()
        self._verify_postback()
        if not self.flag:
            if self.is_transaction():
                if self.payment_status not in self.PAYMENT_STATUS_CHOICES:
                    self.set_flag("Invalid payment_status. (%s)" % self.payment_status)
                if duplicate_txn_id(self):
                    self.set_flag("Duplicate txn_id. (%s)" % self.txn_id)

        self.save()
847796
function refundPayment(id) {
    var callback = preConditions.getCallback(arguments[arguments.length - 1]);

    showWarning();

    return collectionsModule.put({
      id: id,
      status: 'refunded'
    }, callback);
  }
689468
def Verify(self, mempool):
        
        if not super(ClaimTransaction, self).Verify(mempool):
            return False

        # wat does this do
        # get all claim transactions from mempool list
        # that are not this claim
        # and gather all the claims of those claim transactions
        # and see if they intersect the claims of this transaction
        # and if that number is greater than zero that we do not verify
        # (now, to do that in python)
        # if (mempool.OfType < ClaimTransaction > ().Where(p => p != this).SelectMany(p= > p.Claims).Intersect(Claims).Count() > 0)
        # return false;

        # im sorry about the below
        otherclaimTxs = [tx for tx in mempool if tx is ClaimTransaction and tx is not self]
        for other in otherclaimTxs:
            # check to see if the length of the intersection between this objects claim's and the other txs claims is > 0
            if len([list(filter(lambda x: x in self.Claims, otherClaims)) for otherClaims in other.Claims]):
                return False

        txResult = None
        for tx in self.GetTransactionResults():
            if tx.AssetId == Blockchain.SystemCoin().Hash:
                txResult = tx
                break

        if txResult is None or txResult.Amount > Fixed8(0):
            return False

        try:
            return Blockchain.CalculateBonusIgnoreClaimed(self.Claims, False) == -txResult.Amount

        except Exception as e:
            logger.error('Could not calculate bonus: %s ' % e)

        return False
437071
def getChargeInfo(self, CorpNum, ItemCode, UserID=None):
        
        if ItemCode == None or ItemCode == '':
            raise PopbillException(-99999999, "명세서 종류 코드가 입력되지 않았습니다.")

        return self._httpget('/Statement/ChargeInfo/' + ItemCode, CorpNum, UserID)
1335950
def get_license(id):
    
    response = utils.checked_api_call(
        pnc_api.licenses, 'get_specific', id= id)
    if response:
        return utils.format_json(response.content)
37596
def _checkReturnTo(self, message, return_to):
        
        # Check the openid.return_to args against args in the original
        # message.
        try:
            self._verifyReturnToArgs(message.toPostArgs())
        except ProtocolError as why:
            logging.exception("Verifying return_to arguments: %s" % (why, ))
            return False

        # Check the return_to base URL against the one in the message.
        msg_return_to = message.getArg(OPENID_NS, 'return_to')

        # The URL scheme, authority, and path MUST be the same between
        # the two URLs.
        app_parts = urlparse(urinorm.urinorm(return_to))
        msg_parts = urlparse(urinorm.urinorm(msg_return_to))

        # (addressing scheme, network location, path) must be equal in
        # both URLs.
        for part in range(0, 3):
            if app_parts[part] != msg_parts[part]:
                return False

        return True
128223
function get(uuid, callback) {
  if(!util.isFunction(callback)) {
    throw new Error('callback must be a function');
  }

  var order_url = this.coinjar.merchant.orders_endpoint + '/',
    resource = this.coinjar.merchant.api_endpoint +
      '/v1/orders/' +
      uuid +
      '.json';

  request.get(resource)
    .auth(this.coinjar.merchant.uuid, this.coinjar.merchant.secret)
    .end(function (response) {
      if(isResponseError(response, callback)) { return; }
      // build the payment page url
      response.body.order.payment_page_url = order_url + response.body.order.uuid;
      return callback(null, response.body.order);
    });
}
1252588
def get_checkout(self, checkout_id, **params):
        """"""
        response = self._get('v2', 'checkouts', checkout_id, params=params)
        return self._make_api_object(response, Checkout)
1034474
def retry(self):
		

		if not self.paid and not self.forgiven and not self.closed:
			stripe_invoice = self.api_retrieve()
			updated_stripe_invoice = (
				stripe_invoice.pay()
			)  # pay() throws an exception if the charge is not successful.
			type(self).sync_from_stripe_data(updated_stripe_invoice)
			return True
		return False
1211600
def confirms(self, txid):
        """"""
        txid = deserialize.txid(txid)
        return self.service.confirms(txid)
80803
def verify(backup_path, fast):
    """"""
    from PyHardLinkBackup.phlb.verify import verify_backup

    verify_backup(backup_path, fast)