orvelo/php-orvelo-api

The Orvelo PHP API

This package's canonical repository appears to be gone and the package has been frozen as a result.

1.0.5 2019-05-01 10:48 UTC

This package is auto-updated.

Last update: 2024-08-03 18:11:22 UTC


README

Description

The Orvelo PHP API for use with an Orvelo account.

Use this class to submit your forms to Orvelo

Obtaine your unique channel hash from the Settings->profile->Edit Channel section of Orvelo

###Requirements: PHP 5.3.x or higher [http://www.php.net/]
PHP Curl extension [http://www.php.net/manual/en/intro.curl.php]

###Project page: Orvelo
Orvelo API

###Install: ####Composer: "require": { "orvelo/php-orvelo-api": "1.*" }

####Git: git clone https://github.com/Orvelo/PHP-ORVELO-API.git

In the controller or on the page that handles your form submission

Basic Example

This will submit all the $_REQUEST parameters to Orvelo

If you opt to use this method each form will need a hidden field with a unique form identifier, named OrveloName or FormName

WARNING: Do not use this method on forms that handle sensitive information such as credit card details or account passwords.

$orvelo = new Orvelo('<your unique hash>');
orvelo->send();

Advanced Example

This method will allow you to build the form data before sending it to Orvelo.

You can set fields individually or with an array, using setFields after addFields will overwrite any previously set fields.

$orvelo = new Orvelo();
$orvelo
    ->setFormName('FormIdentifier')
    ->setChannelHash('<your unique hash>')
    ->setFields(array("fieldName" => "Field Value", "fieldTwoName" => "Field Two Value"))
    ->addField('name', 'value')
    ->send(false);