Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 81 | All time: 10,096 This week: 62 |
Version | License | PHP version | Categories | |||
php-monetization 1.0.0 | MIT/X Consortium ... | 7 | HTML, E-Commerce, AJAX, PHP 7 |
Here are some features about Web Monetization:
We strongly recoomend using composer
to install this package.
The installation steps are as follows:
composer require lee/php-monetization:^1.0
It's very simple. Here are some usages:
<?php
require_once __DIR__ . '/vendor/autoload.php';
use Lee\WebMonetization\WebMonetization;
// Generate payment pointer URL with meta tag
$paymentPointerUrl = '$ilp.uphold.com/alice';
$metaTag = WebMonetization::generateMetaTag($paymentPointerUrl);
echo $metaTag; // <meta name="monetization" content="$ilp.uphold.com/alice">
// Validate payment pointer URL
$validateResult = WebMonetization::validatePaymentPointer($paymentPointerUrl);
echo $validateResult; // true
// Generate payment pointer
$interLedger = 'ilp';
$domainName = 'uphold';
$tldName = 'com';
$userTokenName = 'alice';
$paymentPointerUrl = WebMonetization::generatePaymentPointer($interLedger, $domainName, $tldName, $userTokenName);
echo $paymentPointerUrl; // $ilp.uphold.com/alice
// Get default payment pointer urls
$webMonetization = new WebMonetization();
$paymentPointerUrls = $webMonetization->getDefaultPaymentPointerUrls();
echo $paymentPointerUrls; // [ '$ilp.uphold.com/', '$ilp.gatehub.net/', '$pay.stronghold.co/',]
Files (9) |
File | Role | Description | ||
---|---|---|---|---|
.github (1 directory) | ||||
src (3 files) | ||||
tests (1 file) | ||||
.cs.php | Example | Example script | ||
composer.json | Data | Auxiliary data | ||
phpunit.xml.dist | Data | Auxiliary data | ||
README.md | Doc. | Read me |
Files (9) | / | src |
File | Role | Description |
---|---|---|
InvalidPaymentPointerUrlException.php | Class | Class source |
PaymentPointerPrefixes.php | Class | Class source |
WebMonetization.php | Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.