Skip to content

Prompt.Cash PHP SDK to create payments (including tokens) and short URLs

License

Notifications You must be signed in to change notification settings

prompt-cash/prompt-php-sdk

Repository files navigation

Prompt.Cash PHP SDK

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:

  1. 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

Contact

Website - Twitter - Telegram - YouTube

About

Prompt.Cash PHP SDK to create payments (including tokens) and short URLs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages