<?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']);

$plans = \Stripe\Plan::all(array("limit" => 10));
echo json_encode($plans["data"]);
?>