Download the PHP package g33kme/adapay without Composer
On this page you can find all versions of the php package g33kme/adapay. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download g33kme/adapay
More information about g33kme/adapay
Files in g33kme/adapay
Package adapay
Short Description With ADAPay you can simply create invoices for cardano payments in your webshop as well as verify incoming payments
License MIT
Homepage https://geekme.com
Informations about the package adapay
ADAPay
ADAPay is a free and open-source Cardano (ADA) payment processor script written in PHP. You need to run a cardano-wallet to work with ADAPay.
With ADAPay you can simply create invoices for cardano payments in your webshop as well as verify the incoming payments.
🙏 Help us improve this project by staking your ADA to our pool with ticker: GEEK
GeekMe Stake Pool
1. Installation: cardano-wallet
⭕ Very important!
It's very easy to run cardano-wallet on your server, but you need to take care that your server has the minimum hardware requirements to run your cardano-node:
- Min 2 vCPU
- Min 8GB of RAM (12GB Recommended)
- 50 GB of disk space (Ideally SSD)
- Good internet connection (at least 10Mbps)
If your hardware did not meet the minimum requirements your cardano-node may not start/sync and you can not use the API the cardano-wallet will serve nor can use ADAPay.
Installing cardano-wallet via docker-compose
So, your server is up and running you can simply download the latest docker-compose.yml and save it to your server. Use docker-compose to quickly spin up cardano-wallet together with supported block producer. Here is exemplary docker-compose.yaml combining the latest versions of cardano-wallet and cardano-node.
We running on Ubuntu 20.04 LTS
When your cardano-wallet is up running NETWORK=mainnet docker-compose up -d
ou can simply check in your Browser the height of the Cardano Blockchain by requesting the following URL:
It may take some time, maybe 1-2 days tilly our cardano-wallet is synced completely. When finish you get some "ready" status in the JSON response when browsing the above URL.
`
ℹ Good to know
If you down composer with NETWORK=mainnet docker-compose down
and up with NETWORK=mainnet docker-compose up
the cardano node maybe rebuilding its ledger DB, which can take a very long time.
Cardano-Node only creates the socket file after this rebuild has finished. You can only connect to the API when the socket file was created.
Or you can simply do a clean-up of your docker with
Then your API is running immediately, however you have to wait some hour that your node height is synced.
⭕ Very important!
cardano-wallet creates a public accessible API on port 8090 (default). At easiest and best simple create firewall rules to access the cardano-wallet API only from specific IPs. You can create firewalls, mostly free, on popular hosting providers like Hetzner, Vultr or DigitalOcean. Of course you can setup a custom firewal rule in your operating system as well.
Wanna run cardano-wallet API on https?
Simply setup a nginx proxy pass for the served API of the cardano-wallet
You should now be able to browse your cardano-wallet API via https/ssl. Keep in mind that we don't created valid ssl certificates, so you get an insecure warning in your browser. However, we don't verify this on ADAPay.
You may also take care to update your firewall settings and block public traffic for Port 443.
2. Installation: ADAPay
Alright, your cardano-wallet is up and running. Let's have a look to our ADAPay library to easily create invoices and check payments.
This library is installable via Composer:
You can also simply manually include source/adapay.php
from this repository to your project and use the ADAPay PHP Class.
Requirements
This library requires PHP 7.1 or later and if you use Composer you need Version 2+.
3. How to use ADApay
With the ADAPay PHP library it's very easy to work with your cardano-wallet API. Check your wallet, craete invoices, check receiving payments ...
Create or Restore Cardano Wallet
Create an invoice
Verify a payment
Get current ADA rates by EUR, USD, GBP ...
More stuff
Best practice and recommendations
-
For best privacy, run your own cardano node and never ever give out your recovery phrase to any third party server!
-
You can restore the same wallet you created on your server on Deadalus Wallet. If you have your wallet in Deadalus you can see incoming transaction and managing your wallet will be easier, e.g if you want to send some refunds to your customer or see more details.
-
Stake and delegate your earned ADA to our Ticker: GEEK and receive extra money for your staking! If you delegated to our GEEK Stake Pool all ongoing received payments will be automatically staked. If your wallet grow your stake amount grow automatically and you earn more money. You easily delegate your ADA in Deadalus Wallet. So simple restore your created wallet on Deadalus too as we mentioned above.
-
Create a second wallet directly in Deadalus Wallet and send some payments to some address in your created ADAPay wallet to test your setup.
-
Create a database table for your created invoices for your users, so you can flag your invoices as "paid". Also if you have connected all of your database entries to one of your user's you can easily show them a list of invoices that are paid, waiting or expired.
- You can use a Javascript setInterval function with an ajax request that check ADAPAY::verifyPayment(); Keep in mind that you should flag your created invoice with status "paid" in a database and only use ADAPAY::verifyPayment(); if you did not yet flag the entry as "paid".
🙏 Supporters
Stake your ADA to our pool with ticker: GEEK
GeekMe Stake Pool
☕ Wanna buy me a coffee or two? Send some ADA to our donation address: addr1qxksn95zhgje7tvdsgfpk9t49sssz4fqewt74neh56cnl4ml8zpc3556jh8exfp70a6f3pva7yf4fmfmw52tdh3dh94sqdvu27