prompt-cash / prompt-php-sdk
Prompt.Cash PHP SDK to create payments (including tokens) and short URLs
v0.0.1
2021-07-05 18:54 UTC
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2025-03-07 18:20:10 UTC
README
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.
Installation
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.
Requirements
PHP >= 7.2
Features
- 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
Docs
Take a look at code examples.
PromptPhpSdk class
__construct(PromptOptions $options = null)
Create the main API class.
PromptOptions $options
- (optional) API options (see below)
Testing
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