PHP code example of doublybear / stripe-product-initiator-package
1. Go to this page and download the library: Download doublybear/stripe-product-initiator-package library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
doublybear / stripe-product-initiator-package example snippets
Doublybear\StripeProductInitiatorPackage\InitiateProducts;
$products = new InitiateProducts();
$json_data = file_get_contents('src/business-plan.json');
$keys = $products->createProduct(
'<stripe secret key>',
json_decode($json_data, true)
);
echo implode(',', $keys);