<?php
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: POST, GET, PUT, DELETE, OPTIONS');
header('Access-Control-Allow-Headers: X-Requested-With, content-type, X-Token, x-token');
require_once('vendor/autoload.php');
\Stripe\Stripe::setApiKey( $_POST['clientSecretKey']);
$product = \Stripe\Product::create(array(
  "name" => $_POST["name"],
  "id" => $_POST["id"],
  "type" => "service",
  "active" => $_POST["active"],
  "statement_descriptor" => $_POST["statement"],
  "metadata"=> array("pluginId" => $_POST['plugin'], "pluginTitle" =>$_POST['title'],  "image"=> $_POST['image'])
));
?>