1. Go to this page and download the library: Download elefant/app-stripe 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/ */
elefant / app-stripe example snippets
echo $this->run ('stripe/payment', array (
'amount' => 1000 // in cents
'description' => 'eBook: Become a master prankster',
'callback' => function ($charge, $payment) {
info ($charge);
info ($payment);
}
));
echo $this->run ('stripe/payment', array (
'plan' => 'basic',
'callback' => function ($customer, $payment) {
info ($customer);
info ($payment);
}
));
if (! $this->internal) return $this->error ();
info ($data['charge']);
info ($data['payment']);
if (! $this->internal) return $this->error ();
info ($data['event']);