/**
  * Build a credit card request
  * @param array $parameters
  * @return stdClass with the credit card request built
  */
 public static function buildCreditCard($parameters)
 {
     $creditCard = new \stdClass();
     $creditCard->token = CommonRequestUtil::getParameter($parameters, PayUParameters::TOKEN_ID);
     $creditCard->customerId = CommonRequestUtil::getParameter($parameters, PayUParameters::CUSTOMER_ID);
     $creditCard->number = CommonRequestUtil::getParameter($parameters, PayUParameters::CREDIT_CARD_NUMBER);
     $creditCard->name = CommonRequestUtil::getParameter($parameters, PayUParameters::PAYER_NAME);
     $creditCard->type = CommonRequestUtil::getParameter($parameters, PayUParameters::PAYMENT_METHOD);
     $creditCard->document = CommonRequestUtil::getParameter($parameters, PayUParameters::CREDIT_CARD_DOCUMENT);
     $creditCard->address = PayUSubscriptionsRequestUtil::buildAddress($parameters);
     $expirationDate = CommonRequestUtil::getParameter($parameters, PayUParameters::CREDIT_CARD_EXPIRATION_DATE);
     if (isset($expirationDate)) {
         PayUSubscriptionsRequestUtil::isValidDate($expirationDate, PayUConfig::PAYU_SECONDARY_DATE_FORMAT, PayUParameters::CREDIT_CARD_EXPIRATION_DATE);
         $expirationDateSplit = explode('/', $expirationDate);
         $creditCard->expYear = $expirationDateSplit[0];
         $creditCard->expMonth = $expirationDateSplit[1];
     }
     return $creditCard;
 }