PHP code example of utopia-php / pay
1. Go to this page and download the library: Download utopia-php/pay 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/ */
utopia-php / pay example snippets
use Utopia\Pay\Pay;
use Utopia\Pay\Adapter\Stripe;
$pay = new Pay(new Stripe('PUBLISHABLE_KEY', 'SECRET_KEY'));
$customer = $pay->createCustomer('Customer One', '[email protected]');
\var_dump($customer);
$pay->setCurrency('INR');
$purchase = $pay->purchase(
5000, // price
$customer['id'], // customer ID
null, // card ID
[
'description' => 'some countries
bash
composer