coinpay / php-integration
php package for coin payment finance
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/coinpay/php-integration
Requires
- php: ^7.0|^8.0
- ext-curl: *
- ext-json: *
This package is not auto-updated.
Last update: 2025-12-18 08:24:27 UTC
README
Safe, fast and instant payments; Anytime, anywhere with CoinPay
Installation
Install with composer:
composer require coinpay/php-integration
Usage
use Coinpay\Finance\CoinPayGateway; try { $gateway = new CoinPayGateway("###COINPAY_API_KEY###"); $response = $gateway->request( 1, // The amount to be paid (in Dollar - $). 'https://your-callback.url', // The URL the user will be redirected to after payment. 'ref123', // A unique reference ID for tracking the transaction. 'payer@example.com', // The identity of the payer (email or phone number). 'Alimo', // Full name of the payer. 'Test Payment', // Description of the payment (e.g. "Payment for order #123"). '1234567890' // National identification code of the payer. ); echo "Payment URL: " . $response->url . PHP_EOL; //Redirect user to payment gateway url echo "Transaction ID: " . $response->transactionId . PHP_EOL; //Store this Id if you need } catch (Exception $e) { echo "Error: " . $e->getMessage() . PHP_EOL; }