@param CardParams $cardParams

@return RawSignedModel
349209
public function generateRawCard(CardParams $cardParams)
    {
        $now = new DateTime();
        $publicKeyString = $this->cardCrypto->exportPublicKey($cardParams->getPublicKey());

        $rawCardContent = new RawCardContent(
            $cardParams->getIdentity(), base64_encode($publicKeyString), '5.0', $now->getTimestamp(), $cardParams->getPreviousCardID()
        );
        $rawCardContentSnapshot = json_encode($rawCardContent, JSON_UNESCAPED_SLASHES);

        $rawSignedModel = new RawSignedModel($rawCardContentSnapshot, []);

        try {
            $this->modelSigner->selfSign($rawSignedModel, $cardParams->getPrivateKey(), $cardParams->getExtraFields());
        } catch (VirgilException $e) {
            //model with empty signatures hasn't this exception
        }

        return $rawSignedModel;
    }
719629
public function cards(array $cards = [])
    {
        if (count($cards) > 10) {
            throw CouldNotCreateMessage::messageCardsLimitExceeded();
        }

        $this->cards = $cards;

        return $this;
    }
218967
public function getCardProvidersList($param)
    {
        $this->flushState();
        $uri = $this->getUriProvider().'/cards';
        $hasError = false;
        return $this->request( $uri ,$param,!$hasError);
    }
502654
public function put($cardData)
    {
        if (is_resource($cardData)) {
            $cardData = stream_get_contents($cardData);
        }

        // Converting to UTF-8, if needed
        $cardData = DAV\StringUtil::ensureUTF8($cardData);

        $etag = $this->carddavBackend->updateCard($this->addressBookInfo['id'], $this->cardData['uri'], $cardData);
        $this->cardData['carddata'] = $cardData;
        $this->cardData['etag'] = $etag;

        return $etag;
    }
1184796
public function withParams(array $params): ParamHolderInterface
    {
        $param_holder = clone $this;
        $param_holder->params = array_merge($param_holder->params, $params);
        return $param_holder;
    }
196670
public function updateCard($requestParams)
    {
        if (empty($requestParams)) {
            return false;
        }
        $result = $this->httpPost(static::WECHAT_UPDATE_CARD_URL . 'access_token=' . $this->getAccessToken(), $requestParams);
        return isset($result['errmsg']) && $result['errmsg'] === 'ok' ? $result : false;
    }
964951
public function getCard($cardID)
    {
        $tokenContext = new TokenContext("", 'get');
        $token = $this->accessTokenProvider->getToken($tokenContext);

        $responseModel = $this->cardClient->getCard($cardID, (string)$token);
        if ($responseModel instanceof ErrorResponseModel) {
            throw new CardClientException(
                "error response from card service", $responseModel->getCode(), $responseModel->getMessage()
            );
        }

        $card = $this->parseRawCard($responseModel->getRawSignedModel(), $responseModel->isOutdated());

        if (!$this->cardVerifier->verifyCard($card)) {
            throw new CardVerificationException('Validation errors have been detected');
        }

        return $card;
    }
1354217
public function card($card)
    {
        if ($card instanceof Card) {
            $this->card = $card;

            return $this;
        }

        if ($card instanceof Closure) {
            $card($new = new Card());
            $this->card = $new;

            return $this;
        }

        throw new InvalidArgumentException(
            'Invalid Card type. Expected '.Card::class.' or '.Closure::class.'.'
        );
    }
564953
public function getCardProvider($param)
    {
        $this->flushState();
        $isValidProvider = CheckoutApi_Client_Validation_GW3::isProvider($param);
        $uri = $this->getUriProvider().'/cards';
        $hasError = false;
        if(!$isValidProvider)
        {
            $hasError = true;
            $this->throwException('Please provide a valid provider id',array('param'=>$param));
        }

        if(!$hasError){
            $uri = "{$uri}/{$param['providerId']}";
        }

        return $this->request( $uri ,$param,!$hasError);
    }
19222
public function get($cardId)
    {
        $params = array('card_id' => $cardId);

        $result = $this->http->jsonPost(self::API_GET, $params);

        return new Bag($result['card']);
    }
266642
public function bindParams($params)
    {
        $bindParams = [''];
        
        foreach ($params as $dbColumnName => $dbColumnValue) {
            $dbColumnValueAry = (!is_array($dbColumnValue)) ? [$dbColumnValue] : $dbColumnValue;
            
            $i = 1;
            foreach ($dbColumnValueAry as $dbColumnValueAryValue) {
                ${$dbColumnName . $i} = $dbColumnValueAryValue;
                
                if (is_numeric($dbColumnValueAryValue)) {
                    $bindParams[0] .= 'i';
                } else if (is_double($dbColumnValueAryValue)) {
                    $bindParams[0] .= 'd';
                } else if (is_string($dbColumnValueAryValue)) {
                    $bindParams[0] .= 's';
                } else if (is_null($dbColumnValueAryValue)) {
                    $bindParams[0] .= 's';
                } else {
                    $bindParams[0] .= 'b';
                }
                
                $bindParams[] = &${$dbColumnName . $i};
                $i++;
            }
        }
        
        call_user_func_array([$this->statement, 'bind_param'], $bindParams);
        
        return $this;
    }
338141
public function createPrintUnimartC2CBillTransaction(array $params)
    {
        // 參數初始化
        $this->sdk->Send = array_merge($this->sdk->Send, [
            'AllPayLogisticsID' => '',
            'CVSPaymentNo' => '',
            'CVSValidationNo' => '',
            'PlatformID' => '',
        ]);

        $this->sdk->Send = array_replace(
            $this->sdk->Send,
            array_intersect_key($params, $this->sdk->Send)
        );

        return $this->sdk->formToArray(
            $this->sdk->PrintUnimartC2CBill()
        );
    }
1137134
public function createCard( CustomerVault\Card $card )
    {
        $card->setRequiredFields(array('profileID'));
        $card->checkRequiredFields();
        $card->setRequiredFields(array(
            'cardNum',
            'cardExpiry'
        ));
        $card->setOptionalFields(array(
            'nickName',
            'merchantRefNum',
            'holderName',
            'billingAddressId',
        ));

        $request = new Request(array(
            'method' => Request::POST,
            'uri' => $this->prepareURI("/profiles/" . $card->profileID . "/cards"),
            'body' => $card
        ));
        $response = $this->client->processRequest($request);
        $response['profileID'] = $card->profileID;

        return new CustomerVault\Card($response);
    }
1355330
public static function create(array $cards, array $customHeaders = []): BunqResponseCardBatch
    {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->post(
            vsprintf(
                self::ENDPOINT_URL_CREATE,
                [static::determineUserId()]
            ),
            [self::FIELD_CARDS => $cards],
            $customHeaders
        );

        return BunqResponseCardBatch::castFromBunqResponse(
            static::fromJson($responseRaw, self::OBJECT_TYPE_POST)
        );
    }
422809
protected function fillCardDetails($card)
    {
        if ($card) {
            $this->card_brand = $card->brand;
            $this->card_last_four = $card->last4;
        }

        return $this;
    }
754475
public static function createHighCard(CardCollection $cards, Hand $hand): self
    {
        $cardValues = $cards->sortByValue()->values();

        $highCard = $cardValues->get(4);

        $definition = sprintf('High Card - %s', $highCard->name());

        return new static(
            self::HIGH_CARD,
            $cardValues->map(function (Card $card) {
                return $card->value();
            })->toArray(),
            $cards,
            $definition,
            $hand
        );
    }
1204980
public function cards($parameters = [])
    {
        $cards = [];

        $parameters = array_merge(['limit' => 24], $parameters);

        $stripeCards = $this->asStripeCustomer()->sources->all(
            ['object' => 'card'] + $parameters
        );

        if (! is_null($stripeCards)) {
            foreach ($stripeCards->data as $card) {
                $cards[] = new Card($this, $card);
            }
        }

        return new Collection($cards);
    }