You are here

public function MiniorangeSAMLCustomer::createCustomer in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 8

Create Customer.

File

src/MiniorangeSAMLCustomer.php, line 52
Contains miniOrange Customer class.

Class

MiniorangeSAMLCustomer

Namespace

Drupal\miniorange_saml

Code

public function createCustomer() {
  $url = MiniorangeSAMLConstants::CUSTOMER_CREATE_API;
  $fields = array(
    'companyName' => $_SERVER['SERVER_NAME'],
    'areaOfInterest' => MiniorangeSAMLConstants::AREA_OF_INTEREST,
    'email' => $this->email,
    'phone' => $this->phone,
    'password' => $this->password,
  );
  $api = new MoAuthApi();
  $header = $api
    ->getHttpHeaderArray();
  return $api
    ->makeCurlCall($url, $fields, $header);
}