public function updateCard($param)
    {
        $this->flushState();
        $uri = $this->getUriCustomer();
        $hasError = false;

      //  $param['method'] = CheckoutApi_Client_Adapter_Constant::API_PUT;
        $isCustomerIdValid = CheckoutApi_Client_Validation_GW3::isCustomerIdValid($param);
        $isCardIdValid = CheckoutApi_Client_Validation_GW3::isGetCardIdValid($param);

        if(!$isCustomerIdValid) {
            $hasError = true;
            $this->throwException('Please provide a valid customer id',array('param'=>$param));

        }elseif(!$isCardIdValid){
            $hasError = true;
            $this->throwException('Please provide a valid card id',array('param'=>$param));
        } else {

            $uri = "$uri/{$param['customerId']}/cards/{$param['cardId']}";
        }

        return $this->request( $uri ,$param,!$hasError);
    }
public function updateCard($param)
    {
        $this->flushState();
        $uri = $this->getUriCustomer();
        $hasError = false;

      //  $param['method'] = CheckoutApi_Client_Adapter_Constant::API_PUT;
        $isCustomerIdValid = CheckoutApi_Client_Validation_GW3::isCustomerIdValid($param);
        $isCardIdValid = CheckoutApi_Client_Validation_GW3::isGetCardIdValid($param);

        if(!$isCustomerIdValid) {
            $hasError = true;
            $this->throwException('Please provide a valid customer id',array('param'=>$param));

        }elseif(!$isCardIdValid){
            $hasError = true;
            $this->throwException('Please provide a valid card id',array('param'=>$param));
        } else {

            $uri = "$uri/{$param['customerId']}/cards/{$param['cardId']}";
        }

        return $this->request( $uri ,$param,!$hasError);
    }
public function updateCard ( $ param ) { $ this -> flushState ( ) ; $ uri = $ this -> getUriCustomer ( ) ; $ hasError = false ; //  $param['method'] = CheckoutApi_Client_Adapter_Constant::API_PUT; $ isCustomerIdValid = CheckoutApi_Client_Validation_GW3 :: isCustomerIdValid ( $ param ) ; $ isCardIdValid = CheckoutApi_Client_Validation_GW3 :: isGetCardIdValid ( $ param ) ; if ( ! $ isCustomerIdValid ) { $ hasError = true ; $ this -> throwException ( 'Please provide a valid customer id' , array ( 'param' => $ param ) ) ; } elseif ( ! $ isCardIdValid ) { $ hasError = true ; $ this -> throwException ( 'Please provide a valid card id' , array ( 'param' => $ param ) ) ; } else { $ uri = "$uri/{$param['customerId']}/cards/{$param['cardId']}" ; } return $ this -> request ( $ uri , $ param , ! $ hasError ) ; }
Update a card
@param array $param payload param for update a card
@return CheckoutApi_Lib_RespondObj
@throws Exception
Simple usage:
$param['customerId'] = $customerId ;
$param['cardId'] = $cardId ;
$param['postedParam'] = array (
'card'        =>  array(
'name'        =>  'New name',
'number'      => '4543474002249996',
'expiryMonth' => 08,
'expiryYear'  => 2017,
'cvv'         => 956,
)
);
$updateCardObj = $Api->updateCard($param);
Update a card