original_string: public function cancelPaymentPlan($param)
      {
          $param['method'] = CheckoutApi_Client_Adapter_Constant::API_DELETE;
          $this->flushState();
          $uri = $this->getUriRecurringPayments().'/plans';
          $hasError = false;
          $isPlanIdValid = CheckoutApi_Client_Validation_GW3::isPlanIdValid($param);
          if(!$isPlanIdValid ) {
              $hasError = true;
              $this->throwException('Please provide a valid plan id',array('param'=>$param));
          }else {
  
              $uri = "$uri/{$param['planId']}";
          }
  
          return $this->request( $uri ,$param,!$hasError);
      }
code: public function cancelPaymentPlan($param)
      {
          $param['method'] = CheckoutApi_Client_Adapter_Constant::API_DELETE;
          $this->flushState();
          $uri = $this->getUriRecurringPayments().'/plans';
          $hasError = false;
          $isPlanIdValid = CheckoutApi_Client_Validation_GW3::isPlanIdValid($param);
          if(!$isPlanIdValid ) {
              $hasError = true;
              $this->throwException('Please provide a valid plan id',array('param'=>$param));
          }else {
  
              $uri = "$uri/{$param['planId']}";
          }
  
          return $this->request( $uri ,$param,!$hasError);
      }
code_tokens: public function cancelPaymentPlan ( $ param ) { $ param [ 'method' ] = CheckoutApi_Client_Adapter_Constant :: API_DELETE ; $ this -> flushState ( ) ; $ uri = $ this -> getUriRecurringPayments ( ) . '/plans' ; $ hasError = false ; $ isPlanIdValid = CheckoutApi_Client_Validation_GW3 :: isPlanIdValid ( $ param ) ; if ( ! $ isPlanIdValid ) { $ hasError = true ; $ this -> throwException ( 'Please provide a valid plan id' , array ( 'param' => $ param ) ) ; } else { $ uri = "$uri/{$param['planId']}" ; } return $ this -> request ( $ uri , $ param , ! $ hasError ) ; }
docstring: Cancel a 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['planId'] = {$planId} ;
  cancelPaymentPlan = $Api->cancelPaymentPlan($param);
docstring_tokens: Cancel a payment plan