Verify transaction is complete and for us.
191781
def _supported_baremetal_transaction(self, context):
        """"""

        port = context.current

        if self.trunk.is_trunk_subport_baremetal(port):
            return self._baremetal_set_binding(context)

        if not nexus_help.is_baremetal(port):
            return False

        if bc.portbindings.PROFILE not in port:
            return False

        profile = port[bc.portbindings.PROFILE]

        if 'local_link_information' not in profile:
            return False

        all_link_info = profile['local_link_information']

        selected = False
        for link_info in all_link_info:

            if 'port_id' not in link_info:
                return False

            switch_info = self._get_baremetal_switch_info(
                              link_info)
            if 'switch_ip' in switch_info:
                switch_ip = switch_info['switch_ip']
            else:
                return False

            if self._switch_defined(switch_ip):
                selected = True
            else:
                LOG.warning("Skip switch %s.  Not configured "
                            "in ini file" % switch_ip)

        if not selected:
            return False

        selected = self._baremetal_set_binding(context, all_link_info)
        if selected:
            self._init_baremetal_trunk_interfaces(
                context.current, context.top_bound_segment)

            if self.trunk.is_trunk_parentport(port):
                self.trunk.update_subports(port)

        return selected
159149
public function isSuccessful()
    {
        // As per appendix F, 000 means the message was processed correctly
        if ((string) $this->data->Status->statusCode !== '000'
            || ($this->hasTransaction()
                && (string) $this->data->Payment->TxnList->Txn->approved !== 'Yes')) {
            return false;
        }

        return true;
    }
1330539
function verify($transaction)
	{
		$this->transaction = $transaction;
		$this->transactionId = $transaction->id;
		$this->amount = intval($transaction->price);
		$this->refId = $transaction->ref_id;
	}
327470
function ok(inst, transaction) {
    if (transaction === undefined) transaction = 0;
    inst.balance = inst.balance + transaction;
    var _ok = inst.balance > 0 && Date.now() < inst.timeout;
    return _ok;
}
477264
def partial_verify_asset_transaction(asset_transaction)
      raise ArgumentError, "Asset Transaction is missing" if !asset_transaction

      # 1. Verify issuing transactions and collect transfer outputs
      cache_transactions do
        if !verify_issues(asset_transaction)
          return nil
        end

        # No transfer outputs, this transaction is verified.
        # If there are assets on some inputs, they are destroyed.
        if asset_transaction.transfer_outputs.size == 0
          # We keep inputs unverified to indicate that they were not even processed.
          return []
        end

        # 2. Fetch parent transactions to verify.
        # * Verify inputs from non-OpenAsset transactions.
        # * Return OA transactions for verification.
        # * Link each input to its OA transaction output.
        prev_unverified_atxs_by_hash = {}
        asset_transaction.inputs.each do |ain|
          txin = ain.transaction_input
          # Ask source if it has a cached verified transaction for this input.
          prev_atx = @source.verified_asset_transaction_for_hash(txin.previous_hash)
          if prev_atx
            BTC::Invariant(prev_atx.verified?, "Cached verified tx must be fully verified")
          end
          prev_atx ||= prev_unverified_atxs_by_hash[txin.previous_hash]
          if !prev_atx
            prev_tx = transaction_for_input(txin)
            if !prev_tx
              Diagnostics.current.add_message("Failed to load previous transaction for input #{ain.index}: #{txin.previous_id}")
              return nil
            end
            begin
              prev_atx = AssetTransaction.new(transaction: prev_tx)
              prev_unverified_atxs_by_hash[prev_atx.transaction_hash] = prev_atx
            rescue FormatError => e
              # Previous transaction is not a valid Open Assets transaction,
              # so we mark the input as uncolored and verified as such.
              ain.asset_id = nil
              ain.value = nil
              ain.verified = true
            end
          end
          # Remember a reference to this transaction so we can validate the whole `asset_transaction` when all previous ones are set and verified.
          ain.previous_asset_transaction = prev_atx
        end # each input

        # Return all unverified transactions.
        # Note: this won't include the already verified one.
        prev_unverified_atxs_by_hash.values
      end
    end
903782
def on_finished(self):
        """"""
        self.controller.is_running = False

        error = self.controller.current_error
        if error is not None:
            self.info(self.tr("Stopped due to error(s), see Terminal."))
        else:
            self.info(self.tr("Finished successfully!"))
41959
def complete(self):
        
        return self.valid and (self.access_token or self.refresh_token or self.type == 2)
1078392
def AddTransaction(self, tx):
        
        if BC.Default() is None:
            return False

        if tx.Hash.ToBytes() in self.MemPool.keys():
            return False

        if BC.Default().ContainsTransaction(tx.Hash):
            return False

        if not tx.Verify(self.MemPool.values()):
            logger.error("Verifying tx result... failed")
            return False

        self.MemPool[tx.Hash.ToBytes()] = tx

        return True
1360144
protected function verifyPayment()
    {
        $fields = array(
            "merchantID" => $this->config->get('gateway.saman.merchant'),
            "RefNum" => $this->refId,
            "password" => $this->config->get('gateway.saman.password'),
        );


        try {
            $soap = new SoapClient($this->serverUrl);
            $response = $soap->VerifyTransaction($fields["RefNum"], $fields["merchantID"]);

        } catch (\SoapFault $e) {
            $this->transactionFailed();
            $this->newLog('SoapFault', $e->getMessage());
            throw $e;
        }

        $response = intval($response);

        if ($response == $this->amount) {
            $this->transactionSucceed();
            return true;
        }

        //Reverse Transaction
        if($response>0){
            try {
                $soap = new SoapClient($this->serverUrl);
                $response = $soap->ReverseTransaction($fields["RefNum"], $fields["merchantID"], $fields["password"], $response);

            } catch (\SoapFault $e) {
                $this->transactionFailed();
                $this->newLog('SoapFault', $e->getMessage());
                throw $e;
            }
        }

        //
        $this->transactionFailed();
        $this->newLog($response, SamanException::$errors[$response]);
        throw new SamanException($response);
        


    }
328495
protected function verifyPayment()
	{
		$processor = new RSAProcessor($this->config->get('gateway.pasargad.certificate-path'),RSAKeyType::XMLFile);
		$fields = array('invoiceUID' => Input::get('tref'));
		$result = Parser::post2https($fields,$this->checkTransactionUrl);
		$check_array = Parser::makeXMLTree($result);

		if ($check_array['resultObj']['result'] != "True") {
		    $this->newLog(-1, Enum::TRANSACTION_FAILED_TEXT);
		    $this->transactionFailed();
		    throw new PasargadErrorException(Enum::TRANSACTION_FAILED_TEXT, -1);
		}
		
		$fields = array(
			'MerchantCode' => $this->config->get('gateway.pasargad.merchantId'),
			'TerminalCode' => $this->config->get('gateway.pasargad.terminalId'),
			'InvoiceNumber' => $check_array['resultObj']['invoiceNumber'],
			'InvoiceDate' => Input::get('iD'),
			'amount' => $check_array['resultObj']['amount'],
			'TimeStamp' => date("Y/m/d H:i:s"),
			'sign' => '',
		);

		$data = "#" . $fields['MerchantCode'] . "#" . $fields['TerminalCode'] . "#" . $fields['InvoiceNumber'] ."#" . $fields['InvoiceDate'] . "#" . $fields['amount'] . "#" . $fields['TimeStamp'] ."#";
		$data = sha1($data, true);
		$data = $processor->sign($data);
		$fields['sign'] = base64_encode($data);
		$result = Parser::post2https($fields,$this->verifyUrl);
		$array = Parser::makeXMLTree($result);
		if ($array['actionResult']['result'] != "True") {
			$this->newLog(-1, Enum::TRANSACTION_FAILED_TEXT);
			$this->transactionFailed();
			throw new PasargadErrorException(Enum::TRANSACTION_FAILED_TEXT, -1);
		}
		$this->refId = $check_array['resultObj']['referenceNumber'];
		$this->transactionSetRefId();
		$this->trackingCode = Input::get('tref');
		$this->transactionSucceed();
		$this->newLog(0, Enum::TRANSACTION_SUCCEED_TEXT);
	}
547382
def wait_for_confirmation(provider, transaction_id):
    ''
    while(True):
        transaction = provider.gettransaction(transaction_id)
        if transaction["confirmations"] > 0:
            break
        time.sleep(10)
766047
def verify(self, base_path, update=False):
        """"""
        return self.project.verify_submission(base_path, self, update=update)
801548
def _fulfill(self, *args, **kwargs):
        
        tx_hash = self.send_transaction('fulfill', args, **kwargs)
        receipt = self.get_tx_receipt(tx_hash)
        return receipt.status == 1
753988
def verify
      create_order
      start_challenge
      wait_verify_status
      check_verify_status
    rescue Acme::Client::Error => e
      retry_on_verify_error(e)
    end
420192
def Verify(self, mempool):
        
        if self.Gas.value % 100000000 != 0:
            return False
        return super(InvocationTransaction, self).Verify(mempool)
417391
def verify(self):
        
        if self._verify is None:
            from twilio.rest.verify import Verify
            self._verify = Verify(self)
        return self._verify
178794
def in_transaction(self):
        
        self._in_transaction = self._in_transaction and self.is_connected
        return self._in_transaction