AlgoWIFI
  • What is AlgoWIFI
  • How it works
    • AlgoWifi for HotSpot
    • AlgoWIFI for Home
    • AlgoWifi for Web 3.0
    • 🧰AlgoWIFI Counter
  • StakeHolders
    • Publisher
    • HotSpotter
  • Economic Model
    • Algorand Blockchain
    • User Address
    • Reserve Address
    • Revenues / Payment
    • Token
  • Campaign
    • Active Campaign
    • Default Campaign
    • Reserve Account
  • Technical Note
    • Atomic Transfer
    • Hardware Compatible list
    • Web Site integration
  • Installation
    • Server
    • Basic Request
    • Php Sdk
  • Configurations
    • Install on Fritz!Box
    • Install on Joomla
    • Install on WordPress
    • Install on PrestaShop
  • FAQ
  • TODO
    • AlgoWIFI for QR-Code
    • AlgoWIFI for Metaverse
Powered by GitBook
On this page
  1. Technical Note

Atomic Transfer

All platform transactions are carried out through Atomic Transfer involving the various stakeholders.

Here is an example of the application:

//Transaction 1 : payment to platform
    $transactions = array();
    $transactions[] = array(
        "txn" => array(
            "aamt" => $platformFee,
            "type" => "axfer", //Tx Type
            "fee" => 1000, //Fee
    ..............................
//Transaction 2 : payment to hotspot owner
    $transactions[] = array(
        "txn" => array(
            "aamt" => $hotspotFee,
            "type" => "axfer", //Tx Type
            "fee" => 1000, //Fee
    ..............................
//Transaction 3 : payment to reserve address
    $transactions[] = array(
        "txn" => array(
            "aamt" => $reserveFee,
            "type" => "axfer", //Tx Type
            "fee" => 1000, //Fee
    ...............................
// 2) Group TRansactions
    $groupid = $algorand_kmd->groupid($transactions);
    #Assigns Group ID
    $transactions[0]['txn']['grp'] = $groupid;
    $transactions[1]['txn']['grp'] = $groupid;
    $transactions[2]['txn']['grp'] = $groupid;
    ................................
//4) Send Transaction Group
    #Broadcasts a raw atomic transaction to the network.
    $params['transaction'] = $txn;
    $return = $algorand->post("v2", "transactions", $params);
    $txId = $return['response']->txId;
    ................................
PreviousTechnical NoteNextHardware Compatible list

Last updated 3 years ago