config = clone $config; $this->config->access_mode_to_strict(); } /** * Get set. * * @return array */ private function get_set() { if ( ! isset( $this->data_set ) ) { $rest_api = new P24_Rest_Heavy( $this->config ); $response = $rest_api->payment_methods( 'pl' ); if ( isset( $response['data'] ) ) { $this->data_set = $response['data']; } else { $this->data_set = array(); } } return $this->data_set; } /** * Has P24Now. * * @return bool */ public function has_p24_now() { $set = $this->get_set(); foreach ( $set as $one ) { if ( 266 === $one['id'] ) { return true; } } return false; } }