This is a PHP library to add Prompt.Cash to your PHP based website (WordPress, Laravel, Joomla, ...). It is a PHP wrapper over the Prompt.Cash REST API.
Work in Progress - DO NOT USE THIS SDK YET
For WordPress there is also an official plugin.
With composer (recommended):
composer require "prompt-cash/prompt-php-sdk"
Manual installation:
- Download the source code and include
prompt-cash.php
from the root directory of this library.
PHP >= 7.2
- create new payments
- show payment QR code as iframe or redirect to payment page in new window
- check payment status
- create short URLs (URL shortener to monetize links)
- get a list of previously created short URLs
- delete and update short URLs
Take a look at code examples.
Create the main API class.
PromptOptions $options
- (optional) API options (see below)
To run unit tests type the following command in the project root directory (requires PHPUnit, installed automatically with Composer):
./vendor/bin/phpunit --bootstrap vendor/autoload.php tests