Skip to content

Automatically send surveys to your customers via text message and collect reviews on all the major review sites.

License

Notifications You must be signed in to change notification settings

MoproTeam/mopro-survey-client-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mopro Survey Client in PHP

PHP Composer

Automatically send surveys to your customers via text message and collect reviews on all the major review sites.

Usage

Note: This version of the Client requires PHP 5.4 or greater.

  1. Send a Survey.
$apiKey = $argv[1];

// Declare Variables to initialize a Survey Model Object
$firstName = "Road";
$lastName = "Runner";
$email = "[email protected]";
$phone = "";
$groupName = "eComm";
$groupDesc = "eComm";

// Create a Survey Model Object
$objSurvey = new Survey($firstName, $lastName, $email, $phone, $groupName, $groupDesc);

// Create an API Client Object
$apiClient = new ApiClient($apiKey);

try {
    $result = $apiClient->post("/sendsurvey", $objSurvey);

    //Print Result
    print_r ($result);
}
catch (Exception $e) {
    echo "Caught exception: ",  $e->getMessage(), "\n";
}

All other examples are available here.

Unit Test

This repo contains unit test scripts using Composer PHP Dependency Manager.

Validate Composer JSON

composer validate --strict

Install Dependencies

composer install --prefer-dist --no-progress --no-suggest

Run Unit Test

composer run-script test

License

The MIT License (MIT) Please see the license file for more information.

Security Vulnerabilities

If you have found a security issue, please contact the maintainers directly at [email protected].

About

Automatically send surveys to your customers via text message and collect reviews on all the major review sites.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages