2017 © Pedro PelĂĄez
 

library trustpilot-links

TrustPilot link generation service

image

notrix/trustpilot-links

TrustPilot link generation service

  • Friday, July 14, 2017
  • by notrix
  • Repository
  • 1 Watchers
  • 0 Stars
  • 899 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 2 % Grown

The README.md

Trustpilot authenticated encryption for PHP

Library for authenticated encryption used with Trustpilot., (*1)

Installation

composer require notrix/trustpilot-links

Usage

Autoload with composer or include the Trustpilot class and invoke it:, (*2)

    // Domain of your site
    $domain = 'example.com';

    // Get the base64 encoded keys from the Trustpilot site:
    $encryptKey = 'dfkkdfj....';
    $authKey = 'dj83lshi....';

    // The payload with your order data:
    $payload = array(
        'email' => 'john@doe.com',
        'name'  => 'John Doe',
        'ref'   => '1234',
    );

    $trustpilot = new Trustpilot($domain, $encryptKey, $authKey);
    $trustpilotInvitationLink = $trustpilot->getInvitationLink($payload);

    // https://www.trustpilot.com/evaluate-bgl/example.com?p=cGF5bG9hZA==
    // Domain of your site
    $domain = 'example.com';

    $trustpilot = new Trustpilot($domain);
    $trustpilotInvitationLink = $trustpilot->getReviewsLink();

    // https://www.trustpilot.com/evaluate/embed/example.com
    // Domain of your site
    $domain = 'example.com';

    // Get the Unique Link Secret Key from your Account Manager at Trustpilot
    $secretKey = 'xfkcdfu....';

    // Order information
    $reference = '1234';
    $email = 'john@doe.com';
    $name = 'John Doe';

    $trustpilot = new Trustpilot($domain, null, null, $secretKey);
    $trustpilotInvitationLink = $trustpilot->getUniqueLink($reference, $email, $name);

    // https://www.trustpilot.com/evaluate/embed/example.com?a=1234&b=am9obkBkb2UuY29t&c=John+Doe&e=e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4

The Versions

14/07 2017

dev-master

9999999-dev

TrustPilot link generation service

  Sources   Download

MIT

trustpilot business link