<?php require __DIR__ . '/../src/Rivio.php'; //create config.php file from config.sample.php and set your rivio keys if (file_exists(__DIR__ . "/config.php")) { require_once __DIR__ . "/config.php"; $rivio_api_key = RIVIO_API_KEY; $rivio_secret_key = RIVIO_SECRET_KEY; } else { $rivio_api_key = 'your_rivio_api_key'; $rivio_secret_key = 'your_rivio_secret_key'; } //Copy credentials from Rivio Dashboard (http://dashboard.getrivio.com/dashboard/settings/business) $rivio = new Rivio($rivio_api_key, $rivio_secret_key); //Get the RIVIO script $rivio_init_script = $rivio->get_init_js(); ?> <html> <head> <title>Product rating module - Rivio PHP SDK example</title> </head> <body> <h1> Product rating stars example </h1> <div> <h2> Smartphone6 </h2>
<?php require __DIR__ . '/../src/Rivio.php'; //create config.php file from config.sample.php and set your rivio keys if (file_exists(__DIR__ . "/config.php")) { require_once __DIR__ . "/config.php"; $rivio_api_key = RIVIO_API_KEY; $rivio_secret_key = RIVIO_SECRET_KEY; } else { $rivio_api_key = 'your_rivio_api_key'; $rivio_secret_key = 'your_rivio_secret_key'; } //Copy credentials from Rivio Dashboard (http://dashboard.getrivio.com/dashboard/settings/business) $rivio = new Rivio($rivio_api_key, $rivio_secret_key); //Minimal parameters list /* $result=$rivio->register_postpurchase_email( "1492411013333333s",//$order_id "2015-09-28T09:16:16-04:00",//$ordered_date "*****@*****.**",//$customer_email "John",//$customer_first_name "1492411012",//$product_id "Samsung Galaxy S6"//$product_name );*/ //Full parameters list try { $result = $rivio->register_postpurchase_email("1492411013331", "2015-09-28T09:16:16-04:00", "*****@*****.**", "John", "1492411012", "Samsung Galaxy S6", "https://example.com/products/galaxy-s6", "https://images.example.com/big/200", "This is the product description", "1234567890123", "Mobile phone", "Samsung", "499"); } catch (Exception $e) { $result = "Error: " . $e->getMessage(); } ?>
<?php require __DIR__ . '/../src/Rivio.php'; $rivio_api_key = 'your_rivio_api_key'; $rivio_secret_key = 'your_rivio_secret_key'; //create config.php file from config.sample.php and set your rivio keys if (file_exists(__DIR__ . "/config.php")) { require_once __DIR__ . "/config.php"; $rivio_api_key = RIVIO_API_KEY; $rivio_secret_key = RIVIO_SECRET_KEY; } //Copy credentials from Rivio Dashboard (http://dashboard.reev.io/dashboard/settings/business) $rivio = new Rivio($rivio_api_key, $rivio_secret_key); $rivio_embed_html = $rivio->get_embed_html("1492411012", "Samsung Galaxy S6", "https://example.com/products/galaxy-s6", "https://images.example.com/big/200", "This is the product description", "1234567890123", "Mobile phone", "Samsung", "499"); ?> <html> <head> <title>Embed module - Rivio PHP SDK example</title> </head> <body> <h1>Rivio Embed Module:</h1> <?php echo $rivio_embed_html; ?> </body> </html>