bysquare_dart 1.0.2 copy "bysquare_dart: ^1.0.2" to clipboard
bysquare_dart: ^1.0.2 copied to clipboard

Encode & decode PAY by square and Invoice by square QR strings - Slovak banking standard (SBA).

example/example.dart

import 'package:bysquare_dart/bysquare_dart.dart';

void main() {
  // Encode
  final qr = payEncode(
    PayDataModel(
      invoiceId: 'FAK-2024-001',
      payments: [
        PaymentOrder(
          amount: 19.99,
          currencyCode: 'EUR',
          variableSymbol: '1234567890',
          bankAccounts: [
            BankAccount(
              iban: 'SK9611000000002918599669',
              bic: 'TATRSKBX',
            ),
          ],
          beneficiary: Beneficiary(name: 'Acme s.r.o.'),
        ),
      ],
    ),
  );

  print('Encoded: $qr');

  // Decode
  final model = payDecode(qr);
  print('Amount: ${model.payments.first.amount}');
  print('IBAN: ${model.payments.first.bankAccounts.first.iban}');
}
1
likes
160
points
32
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Encode & decode PAY by square and Invoice by square QR strings - Slovak banking standard (SBA).

Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

lzma

More

Packages that depend on bysquare_dart