public function setCreditCard(CreditCard $creditCard)
    {
        $creditCard->setContext(Moip::PAYMENT);

        $fundingInstrument = new stdClass;
        $fundingInstrument->method = 'CREDIT_CARD';
        $fundingInstrument->creditCard = $creditCard->getData();

        $this->data->fundingInstrument = $fundingInstrument;

        unset($this->data->fundingInstruments);

        return $this;
    }
public function setCreditCard(CreditCard $creditCard)
    {
        $creditCard->setContext(Moip::PAYMENT);

        $fundingInstrument = new stdClass;
        $fundingInstrument->method = 'CREDIT_CARD';
        $fundingInstrument->creditCard = $creditCard->getData();

        $this->data->fundingInstrument = $fundingInstrument;

        unset($this->data->fundingInstruments);

        return $this;
    }
public function setCreditCard ( CreditCard $ creditCard ) { $ creditCard -> setContext ( Moip :: PAYMENT ) ; $ fundingInstrument = new stdClass ; $ fundingInstrument -> method = 'CREDIT_CARD' ; $ fundingInstrument -> creditCard = $ creditCard -> getData ( ) ; $ this -> data -> fundingInstrument = $ fundingInstrument ; unset ( $ this -> data -> fundingInstruments ) ; return $ this ; }
Set customer credit card

@param  \Softpampa\Moip\Helpers\CreditCard  $creditCard
@return $this
Set customer credit card