PHP code example of prestashopcorp / module-lib-billing
1. Go to this page and download the library: Download prestashopcorp/module-lib-billing library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?phprequire_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
prestashopcorp / module-lib-billing example snippets
// Load context for PsBilling
$billingFacade = $this->getService('ps_billings.facade');
// Remove this if you don't need to set an image
$partnerLogo = $this->getLocalPath() . ' views/img/partnerLogo.png';
// Billing
Media::addJsDef($billingFacade->present([
'logo' => $partnerLogo,
'tosLink' => 'https://yoururl/',
'privacyLink' => 'https://yoururl/',
'emailSupport' => 'you@email',
]));
bash
# Needs to have wget, for OS without wget pleae see the official website (or just visit this link)
PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;")
if [[ ${PHP_VERSION} -gt "72" ]]; then
wget -O phpunit https://phar.phpunit.de/phpunit-9.pharelse
wget -O phpunit https://phar.phpunit.de/phpunit-8.phar
fi
chmod +x phpunit
# Should display the version
./phpunit --version
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.