public function cancelCustomerPaymentPlan($param)
    {
        $param['method'] = CheckoutApi_Client_Adapter_Constant::API_DELETE;
        $this->flushState();
        $uri = $this->getUriRecurringPayments().'/customers';
        $hasError = false;
        $isCustomerPlanIdValid = CheckoutApi_Client_Validation_GW3::isCustomerPlanIdValid($param);
        if(!$isCustomerPlanIdValid ) {
            $hasError = true;
            $this->throwException('Please provide a valid customer plan id',array('param'=>$param));
        }else {

            $uri = "$uri/{$param['customerPlanId']}";
        }

        return $this->request( $uri ,$param,!$hasError);
    }
public function cancelCustomerPaymentPlan($param)
    {
        $param['method'] = CheckoutApi_Client_Adapter_Constant::API_DELETE;
        $this->flushState();
        $uri = $this->getUriRecurringPayments().'/customers';
        $hasError = false;
        $isCustomerPlanIdValid = CheckoutApi_Client_Validation_GW3::isCustomerPlanIdValid($param);
        if(!$isCustomerPlanIdValid ) {
            $hasError = true;
            $this->throwException('Please provide a valid customer plan id',array('param'=>$param));
        }else {

            $uri = "$uri/{$param['customerPlanId']}";
        }

        return $this->request( $uri ,$param,!$hasError);
    }
public function cancelCustomerPaymentPlan ( $ param ) { $ param [ 'method' ] = CheckoutApi_Client_Adapter_Constant :: API_DELETE ; $ this -> flushState ( ) ; $ uri = $ this -> getUriRecurringPayments ( ) . '/customers' ; $ hasError = false ; $ isCustomerPlanIdValid = CheckoutApi_Client_Validation_GW3 :: isCustomerPlanIdValid ( $ param ) ; if ( ! $ isCustomerPlanIdValid ) { $ hasError = true ; $ this -> throwException ( 'Please provide a valid customer plan id' , array ( 'param' => $ param ) ) ; } else { $ uri = "$uri/{$param['customerPlanId']}" ; } return $ this -> request ( $ uri , $ param , ! $ hasError ) ; }
Cancel a customer payment plan
@param array $param payload param for deleting a payment plan
@return CheckoutApi_Lib_RespondObj
@throws Exception
This method can be call this way:
$param['customerPlanId'] = {$customerPlanId} ;
cancelCustomerPaymentPlan = $Api->cancelCustomerPaymentPlan($param);
Cancel a customer payment plan