original_string: public function createLocalPaymentCharge($param)
      {
          $hasError = false;
          $param['postedParam']['type'] = CheckoutApi_Client_Constant::LOCALPAYMENT_CHARGE_TYPE;
          $postedParam = $param['postedParam'];
          $this->flushState();
          $uri = $this->getUriCharge();
          $isValidEmail = CheckoutApi_Client_Validation_GW3::isEmailValid($postedParam);
          $isValidSessionToken = CheckoutApi_Client_Validation_GW3::isSessionToken($postedParam);
          $isValidLocalPaymentHash = CheckoutApi_Client_Validation_GW3::isLocalPyamentHashValid($postedParam);
          $param['method'] = CheckoutApi_Client_Adapter_Constant::API_POST;
          if(!$isValidEmail){
              $hasError = true;
              $this->throwException('Please provide a valid email address',array('postedParam'=>$postedParam));
          }
  
          if(!$isValidSessionToken){
              $hasError = true;
              $this->throwException('Please provide a valid session token',array('postedParam'=>$postedParam));
          }
  
          if(!$isValidLocalPaymentHash){
              $hasError = true;
              $this->throwException('Please provide a local payment hash',array('postedParam'=>$postedParam));
          }
  
          if(!isset($param['postedParam']['localPayment']['userData']) ) {
              $param['postedParam']['localPayment']['userData'] = '{}';
          }
          return $this->request( $uri ,$param,!$hasError);
      }
code: public function createLocalPaymentCharge($param)
      {
          $hasError = false;
          $param['postedParam']['type'] = CheckoutApi_Client_Constant::LOCALPAYMENT_CHARGE_TYPE;
          $postedParam = $param['postedParam'];
          $this->flushState();
          $uri = $this->getUriCharge();
          $isValidEmail = CheckoutApi_Client_Validation_GW3::isEmailValid($postedParam);
          $isValidSessionToken = CheckoutApi_Client_Validation_GW3::isSessionToken($postedParam);
          $isValidLocalPaymentHash = CheckoutApi_Client_Validation_GW3::isLocalPyamentHashValid($postedParam);
          $param['method'] = CheckoutApi_Client_Adapter_Constant::API_POST;
          if(!$isValidEmail){
              $hasError = true;
              $this->throwException('Please provide a valid email address',array('postedParam'=>$postedParam));
          }
  
          if(!$isValidSessionToken){
              $hasError = true;
              $this->throwException('Please provide a valid session token',array('postedParam'=>$postedParam));
          }
  
          if(!$isValidLocalPaymentHash){
              $hasError = true;
              $this->throwException('Please provide a local payment hash',array('postedParam'=>$postedParam));
          }
  
          if(!isset($param['postedParam']['localPayment']['userData']) ) {
              $param['postedParam']['localPayment']['userData'] = '{}';
          }
          return $this->request( $uri ,$param,!$hasError);
      }
code_tokens: public function createLocalPaymentCharge ( $ param ) { $ hasError = false ; $ param [ 'postedParam' ] [ 'type' ] = CheckoutApi_Client_Constant :: LOCALPAYMENT_CHARGE_TYPE ; $ postedParam = $ param [ 'postedParam' ] ; $ this -> flushState ( ) ; $ uri = $ this -> getUriCharge ( ) ; $ isValidEmail = CheckoutApi_Client_Validation_GW3 :: isEmailValid ( $ postedParam ) ; $ isValidSessionToken = CheckoutApi_Client_Validation_GW3 :: isSessionToken ( $ postedParam ) ; $ isValidLocalPaymentHash = CheckoutApi_Client_Validation_GW3 :: isLocalPyamentHashValid ( $ postedParam ) ; $ param [ 'method' ] = CheckoutApi_Client_Adapter_Constant :: API_POST ; if ( ! $ isValidEmail ) { $ hasError = true ; $ this -> throwException ( 'Please provide a valid email address' , array ( 'postedParam' => $ postedParam ) ) ; } if ( ! $ isValidSessionToken ) { $ hasError = true ; $ this -> throwException ( 'Please provide a valid session token' , array ( 'postedParam' => $ postedParam ) ) ; } if ( ! $ isValidLocalPaymentHash ) { $ hasError = true ; $ this -> throwException ( 'Please provide a local payment hash' , array ( 'postedParam' => $ postedParam ) ) ; } if ( ! isset ( $ param [ 'postedParam' ] [ 'localPayment' ] [ 'userData' ] ) ) { $ param [ 'postedParam' ] [ 'localPayment' ] [ 'userData' ] = '{}' ; } return $ this -> request ( $ uri , $ param , ! $ hasError ) ; }
docstring: Create LocalPayment Charge.
  Creates a LocalPayment Charge using a Session Token and
  @param array $param payload param for creating a localpayment
  @return CheckoutApi_Lib_RespondObj
  This can be call in this way:
  $chargeLocalPaymentConfig['authorization'] = $publicKey ;
  $param['postedParam'] = array(
  'email'        =>  'dhiraj.checkout@checkout.com',
  'token'        =>   $Api->getSessionToken($sessionConfig),
  'localPayment' =>  array(
  'lppId'  => $Api->getLocalPaymentProvider($localPaymentConfig)->getId()
  )
  ) ;
  $chargeLocalPaymentObj = $Api->createLocalPaymentCharge($chargeLocalPaymentConfig);
docstring_tokens: Create LocalPayment Charge . Creates a LocalPayment Charge using a Session Token and