public function  voidCharge($param)
    {
        $hasError = false;
        $param['postedParam']['type'] = CheckoutApi_Client_Constant::CHARGE_TYPE;
        $postedParam = $param['postedParam'];
        $this->flushState();
        $isAmountValid = CheckoutApi_Client_Validation_GW3::isValueValid($postedParam);
        $isChargeIdValid = CheckoutApi_Client_Validation_GW3::isChargeIdValid($param);
        $uri = $this->getUriCharge();

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

        } else {

            $uri = "$uri/{$param['chargeId']}/void";
        }
        if(!$isAmountValid) {
            $this->throwException('Please provide a amount (in cents)',array('param'=>$param),false);
        }

        return $this->_responseUpdateStatus($this->request( $uri ,$param,!$hasError));
    }
public function  voidCharge($param)
    {
        $hasError = false;
        $param['postedParam']['type'] = CheckoutApi_Client_Constant::CHARGE_TYPE;
        $postedParam = $param['postedParam'];
        $this->flushState();
        $isAmountValid = CheckoutApi_Client_Validation_GW3::isValueValid($postedParam);
        $isChargeIdValid = CheckoutApi_Client_Validation_GW3::isChargeIdValid($param);
        $uri = $this->getUriCharge();

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

        } else {

            $uri = "$uri/{$param['chargeId']}/void";
        }
        if(!$isAmountValid) {
            $this->throwException('Please provide a amount (in cents)',array('param'=>$param),false);
        }

        return $this->_responseUpdateStatus($this->request( $uri ,$param,!$hasError));
    }
public function voidCharge ( $ param ) { $ hasError = false ; $ param [ 'postedParam' ] [ 'type' ] = CheckoutApi_Client_Constant :: CHARGE_TYPE ; $ postedParam = $ param [ 'postedParam' ] ; $ this -> flushState ( ) ; $ isAmountValid = CheckoutApi_Client_Validation_GW3 :: isValueValid ( $ postedParam ) ; $ isChargeIdValid = CheckoutApi_Client_Validation_GW3 :: isChargeIdValid ( $ param ) ; $ uri = $ this -> getUriCharge ( ) ; if ( ! $ isChargeIdValid ) { $ hasError = true ; $ this -> throwException ( 'Please provide a valid charge id' , array ( 'param' => $ param ) ) ; } else { $ uri = "$uri/{$param['chargeId']}/void" ; } if ( ! $ isAmountValid ) { $ this -> throwException ( 'Please provide a amount (in cents)' , array ( 'param' => $ param ) , false ) ; } return $ this -> _responseUpdateStatus ( $ this -> request ( $ uri , $ param , ! $ hasError ) ) ; }
Void  Charge
This method void a Card Charge that has previously been created


@param array $param payload param for void a charge
@return CheckoutApi_Lib_RespondObj
@throws Exception
Simple usage:
$param['postedParam'] = array ('value'=>150);
$refundCharge = $Api->refundCharge($param);
Void Charge This method void a Card Charge that has previously been created