PHP code example of astrotechlabs / suitpay-sdk
1. Go to this page and download the library: Download astrotechlabs/suitpay-sdk 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/ */
astrotechlabs / suitpay-sdk example snippets
$suitPay = new SuitPayGateway(new SuitPayParams(
clientId: $_ENV['CLIENT_ID'],
clientSecret: $_ENV['CLIENT_SECRET'],
isProduction: $_ENV['IS_PRODUCTION']
));
return $suitPay->createPixCharge(new PixData(
dueDate: date('Y-m-d'),
amount: 100,
callbackUrl: $_ENV['PIX_WEBHOOK_URL'],
clientData: new SuitPayCustomer(
name: "Nome do Pagador",
document: "CPF do Pagador",
email: "E-mail do Pagador"
)
));
bash
$ php composer.phar