You are here

public static function API::method__notice_paid_till in Anti Spam by CleanTalk 8.3

* Wrapper for notice_paid_till API method. * Gets information about renew notice. * *

Parameters

string $api_key API key: * @param string $path_to_cms Website URL * @param string $product_name * @param bool $do_check * * @return array|bool|mixed

1 call to API::method__notice_paid_till()
CleantalkSettingsForm::validateForm in src/Form/CleantalkSettingsForm.php
Form validation handler.

File

src/lib/Cleantalk/Common/API.php, line 144

Class

API
CleanTalk API class. Mostly contains wrappers for API methods. Check and send mehods. Compatible with any CMS.

Namespace

Drupal\cleantalk\lib\Cleantalk\Common

Code

public static function method__notice_paid_till($api_key, $path_to_cms, $product_name = 'antispam', $do_check = true) {
  $request = array(
    'method_name' => 'notice_paid_till',
    'path_to_cms' => $path_to_cms,
    'auth_key' => $api_key,
  );
  $product_id = null;
  $product_id = $product_name == 'antispam' ? 1 : $product_id;
  $product_id = $product_name == 'security' ? 4 : $product_id;
  if ($product_id) {
    $request['product_id'] = $product_id;
  }
  $result = static::send_request($request);
  $result = $do_check ? static::check_response($result, 'notice_paid_till') : $result;
  return $result;
}