比特币
@param $address
@param $amount
@param $label
@param $message
@param $returnAddress
@return QrCode
962208
public function btc($address, $amount, $label, $message, $returnAddress) {
        return $this->encode(sprintf('bitcoin:%s?%s', $address, http_build_query([
            'amount'    => $amount,
            'label'     => $label,
            '$message'  => $message,
            'r'         => $returnAddress,
        ])));
    }
24686
private function scanAddress($address)
    {
        /*
         * today's timestamp used as report time (today 00:00) to prevent a lot of duplicates on the
         * same day. Using the same time will aggregate and deduplicate events into 1 per day.
         */


        if (!filter_var($address, FILTER_VALIDATE_IP) === false) {
            $addressReverse = implode('.', array_reverse(preg_split('/\./', $address)));

            foreach ($this->feeds as $feedName => $feedData) {
                $this->feedName = $feedName;

                if ($this->isKnownFeed() && $this->isEnabledFeed()) {
                    $lookup = $addressReverse . '.' . $feedData['zone'] . '.';

                    if ($result = gethostbyname($lookup)) {
                        if ($result != $lookup) {
                            // If config is empty, we fall back to this
                            $reason = 'SPAM Sending host';

                            // Set the config default reason if available
                            if (array_key_exists('default', $feedData['codes'])) {
                                $reason = $feedData['codes']['default'];
                            }

                            // Set the config specific reason if available
                            if (array_key_exists($result, $feedData['codes'])) {
                                $reason = $feedData['codes'][$result];
                            }

                            $incident = new Incident();
                            $incident->source      = $feedName;
                            $incident->source_id   = false;
                            $incident->ip          = $address;
                            $incident->domain      = false;
                            $incident->class       = $feedData['class'];
                            $incident->type        = $feedData['type'];

                            /*
                             * today's timestamp used as report time (today 00:00) to prevent a lot of duplicates on the
                             * same day. Using the same time will aggregate and deduplicate events into 1 per day.
                             */
                            $incident->timestamp   = Carbon::today()->timestamp;

                            $incident->information = json_encode(
                                array_merge(
                                    $feedData['information'],
                                    [
                                        'reason' => $reason
                                    ]
                                )
                            );

                            $this->incidents[] = $incident;
                        }
                    }
                }
            }
        } else {
            $this->warningCount++;
        }

        return true;
    }
1251751
public static String convertToBitcoinURI(Address address, Coin amount,
                                             String label, String message) {
        return convertToBitcoinURI(address.getParameters(), address.toString(), amount, label, message);
    }
27064
public function getTransactionById($wallet_uuid, $txid, $address_uuid)
    {
        $parameters = [
            'uuid' => $address_uuid,
        ];
        return $this->newAPIRequest('GET', $wallet_uuid . '/address/transaction/' . $txid, $parameters);
    }
738410
public function bcc($address, $name = null)
    {
        if ($this->arrayOfAddresses($address)) {
            $this->bcc += $this->parseAddresses($address);
        } else {
            $this->bcc[] = [$address, $name];
        }

        return $this;
    }
231369
public function getQRCodeInlineV1($company, $holder, $secret, $size = 200, $encoding = 'utf-8')
    {
        $url = $this->getQRCodeUrl($company, $holder, $secret);

        $renderer = $this->imageBackEnd;
        $renderer->setWidth($size);
        $renderer->setHeight($size);

        $bacon = new BaconQrCodeWriter($renderer);
        $data = $bacon->writeString($url, $encoding);

        if ($this->imageBackEnd instanceof Png) {
            return 'data:image/png;base64,'.base64_encode($data);
        }
        return $data;
    }
725649
public function postalLabelFormatTheliaAddress($address, $locale = null, $originCountry = null, $options = [])
    {
        $address = $this->mapTheliaAddress($address, $locale);
        return $this->postalLabelFormat($address, $locale, $originCountry, $options);
    }
569766
public static function fromStdClass($_address)
    {
      $address = new static();

      if(isset($_address->country))
        $address->setCountry($_address->country);

      if(isset($_address->state))
        $address->setState($_address->state);

      if(isset($_address->municipality))
        $address->setMunicipality($_address->municipality);

      if(isset($_address->city))
        $address->setCity($_address->city);

      if(isset($_address->district))
        $address->setDistrict($_address->district);

      if(isset($_address->neighbourhood))
        $address->setNeighbourhood($_address->neighbourhood);

      if(isset($_address->street))
        $address->setStreet($_address->street);

      if(isset($_address->number))
        $address->setNumber($_address->number);

      if(isset($_address->addition))
        $address->setAddition($_address->addition);

      if(isset($_address->zipcode))
        $address->setZipcode($_address->zipcode);

      return $address;
    }
766268
function(qrContainer) {

        var elem = qrContainer.parents(".bitcoin-address-container");
        var url;
        //var addr = elem.attr("data-bc-address");

        if(this.config.qrRawAddress) {
            url = elem.attr("data-bc-address");
        } else {
            url = this.buildBitcoinURI(elem.attr("data-bc-address"),
            elem.attr("data-bc-amount"),
            elem.attr("data-bc-label"));
        }

        var options = $.extend({}, this.config.qr, {
            text: url
        });
        var qrCode = new qrcode.QRCode(qrContainer.get(0), options);
    }
1043568
public static function qrPaymentImage($account, $amount, $variableSymbol, $message = 'QR Platba', $size = 200)
    {
        $account = explode('/', $account);
        $url = 'http://api.paylibo.com/paylibo/generator/czech/image?'
            .'accountNumber='.str_replace([' ', '-'], '', $account[0])
            .'&bankCode='.$account[1]
            .'&amount='.number_format($amount, 2, '.', '')
            .'&message='.urlencode($message)
            .'&size='.$size
            .'&currency=CZK'
            .'&vs='.$variableSymbol;

        return $url;
    }
22579
public function chargeReturningTransaction($authorization, $amount, $email, $plan = '')
    {
        $returningTransaction = ReturningTransaction::make(
            $authorization,
            $amount,
            $email,
            $plan instanceof Plan ? $plan->get('plan_code') : $plan
        );
        $returningTransaction->setTransactionResource($this->getTransactionResource());

        $transaction = $returningTransaction->charge();

        if ($transaction instanceof \Exception) {
            throw $transaction;
        }

        return $transaction;
    }
98352
protected static function deleteAddressByIdAsyncWithHttpInfo($address_id) 
    {
        $returnType = '';  
        $request = self::deleteAddressByIdRequest($address_id); 

        return self::getHttpClient()
            ->sendAsync($request, self::createHttpClientOption())
            ->then(
                function ($response) use ($returnType) {
                    return [null, $response->getStatusCode(), $response->getHeaders()];
                },
                function ($exception) {
                    $response = $exception->getResponse();
                    $statusCode = $response->getStatusCode();
                    throw new ApiException(
                        sprintf(
                            '[%d] Error connecting to the API (%s)',
                            $statusCode,
                            $exception->getRequest()->getUri()
                        ),
                        $statusCode,
                        $response->getHeaders(),
                        $response->getBody()
                    );
                }
            );
    }
1326164
protected function send($address, $data, $headers, $envelope = null)
    {
        if (!$envelope || strpos(ini_get('sendmail_path'),' -f') !== false) {
            return mail($address,
                $this->subject,
                $data,
                $headers);
        } else {
            return mail($address,
                $this->subject,
                $data,
                $headers,
                '-f' . $envelope);
        }
    }
308677
public function validateAddress(string $address, string $coin): stdClass
    {
        $result = $this->get(sprintf('%s/%s/%s', Resources::VALIDATE_ADDRESS, $address, $coin));

        if (!isset($result->isValid) && isset($result->isvalid)) {
            $result->isValid = $result->isvalid;
            unset ($result->isvalid);
        }

        return $result;
    }
408685
public function createAddress(Address $address, array $params = [])
    {
        $this->getClient()->createAccountAddress($this, $address, $params);
    }
892475
public function verifyAddress($address, $signature) {
        if ($this->verifyMessage($address, $address, $signature)) {
            return ['result' => true, 'msg' => 'Successfully verified'];
        } else {
            return ['result' => false];
        }
    }
1097766
protected function getFromCache($address, $country)
    {
        $builder = $this->connection->createQueryBuilder();
        $builder
            ->select('*')
            ->from($this->connection->quoteIdentifier('tl_metamodel_perimetersearch'))
            ->where($builder->expr()->eq($this->connection->quoteIdentifier('search'), ':search'))
            ->andWhere($builder->expr()->eq($this->connection->quoteIdentifier('country'), ':country'))
            ->setParameter('search', $address)
            ->setParameter('country', $country);

        $statement = $builder->execute();

        // If we have no data just return null.
        if (!$statement->rowCount()) {
            return null;
        }

        $result = $statement->fetch(\PDO::FETCH_OBJ);

        // Build a new container.
        $container = new Container();
        $container->setLatitude($result->geo_lat);
        $container->setLongitude($result->geo_long);
        $container->setSearchParam(
            \strtr(
                $builder->getSQL(),
                [
                    ':search'  => $this->connection->quote($address),
                    ':country' => $this->connection->quote($country)
                ]
            )
        );

        return $container;
    }