original_string: protected function validatePaymentAddressOrder()
      {
          $field = 'payment_address';
  
          if ($this->isExcluded($field)) {
              return null;
          }
  
          $value = $this->getSubmitted($field);
  
          if (!isset($value) && $this->isUpdating()) {
              $this->unsetSubmitted($field);
              return null;
          }
  
          if (empty($value) && !$this->isError('shipping_address')) {
              $value = $this->getSubmitted('shipping_address');
          }
  
          $label = $this->translation->text('Payment address');
  
          if (empty($value)) {
              $this->setErrorRequired($field, $label);
              return false;
          }
  
          if (!is_numeric($value)) {
              $this->setErrorNumeric($field, $label);
              return false;
          }
  
          $address = $this->address->get($value);
  
          if (empty($address)) {
              $this->setErrorUnavailable($field, $label);
              return false;
          }
  
          $this->setSubmitted($field, $value);
          return true;
      }
code: protected function validatePaymentAddressOrder()
      {
          $field = 'payment_address';
  
          if ($this->isExcluded($field)) {
              return null;
          }
  
          $value = $this->getSubmitted($field);
  
          if (!isset($value) && $this->isUpdating()) {
              $this->unsetSubmitted($field);
              return null;
          }
  
          if (empty($value) && !$this->isError('shipping_address')) {
              $value = $this->getSubmitted('shipping_address');
          }
  
          $label = $this->translation->text('Payment address');
  
          if (empty($value)) {
              $this->setErrorRequired($field, $label);
              return false;
          }
  
          if (!is_numeric($value)) {
              $this->setErrorNumeric($field, $label);
              return false;
          }
  
          $address = $this->address->get($value);
  
          if (empty($address)) {
              $this->setErrorUnavailable($field, $label);
              return false;
          }
  
          $this->setSubmitted($field, $value);
          return true;
      }
code_tokens: protected function validatePaymentAddressOrder ( ) { $ field = 'payment_address' ; if ( $ this -> isExcluded ( $ field ) ) { return null ; } $ value = $ this -> getSubmitted ( $ field ) ; if ( ! isset ( $ value ) && $ this -> isUpdating ( ) ) { $ this -> unsetSubmitted ( $ field ) ; return null ; } if ( empty ( $ value ) && ! $ this -> isError ( 'shipping_address' ) ) { $ value = $ this -> getSubmitted ( 'shipping_address' ) ; } $ label = $ this -> translation -> text ( 'Payment address' ) ; if ( empty ( $ value ) ) { $ this -> setErrorRequired ( $ field , $ label ) ; return false ; } if ( ! is_numeric ( $ value ) ) { $ this -> setErrorNumeric ( $ field , $ label ) ; return false ; } $ address = $ this -> address -> get ( $ value ) ; if ( empty ( $ address ) ) { $ this -> setErrorUnavailable ( $ field , $ label ) ; return false ; } $ this -> setSubmitted ( $ field , $ value ) ; return true ; }
docstring: Validates a payment address
  @return boolean
docstring_tokens: Validates a payment address