PHP code example of pstoregr / myaade

1. Go to this page and download the library: Download pstoregr/myaade library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

pstoregr / myaade example snippets


$settings = array(
    'environment' => 'dev',
    'credentials' => array(
        'user_id' => '',
        'subscription_key' => ''
    )
);

$invoice = array(
    // issuer
    'issuer' => array(
        'afm' => '123435678',
        'country' => 'GR',
        'branch' => 1
    ),
    // customer
    'customer' => array(
        // address
        'postaCode' => '32444',
        'city' => 'CITY',

        // counterpart
        'afm' => '123435678',
        'country' => 'GR',
        'branch' => 1,

        // invoiceHeader
        'series' => 'A',
        'aa' => '101',
        'issueDate' => '2023-01-01',
        'currency' => 'EUR',
        'dispatchDate' => '2023-01-01',
        'dispatchTime' => '13:40:00',
        'vehicleNumber' => 'EKA 5485',

        // paymentMethodDetail
        'paymentMethodAmount' => 1240000.00,
        'paymentMethodInfo' => 'Payment Method Info...',

        // incomeClassification
        'incomeClassificationAmount' => 1000000.00,

        // invoicedetails
        'lineNumber' => 1,
        'netValue' => 1000000.00,
        'vatAmount' => 240000.00,
        'discountOption' => true,

        // invoiceSummary    
        'totalNetValue' => 1000000.00,
        'totalVatAmount' => 240000.00,
        'totalWithHeldAmount' => 0.00,
        'totalFeesAmount' => 0.00,
        'totalStampDutyAmount' => 0.00,
        'totalOtherTaxesAmount' => 0.00,
        'totalDeductionsAmount' => 0.00,
        'totalGrossValue' => 1240000.00,
    )
);