suisse 0.1.1 copy "suisse: ^0.1.1" to clipboard
suisse: ^0.1.1 copied to clipboard

Library for communicating with the BitcoinSuisse API

example/suisse_example.dart

import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:suisse/suisse.dart';

main(List<String> args) async {
  var client = Client("https://test-paymentterminal.bitcoinsuisse.ch", args[0]);
  var payment = Payment()
    ..merchantNumber = args[1]
    ..terminalNumber = args[2]
    ..amount = 100
    ..fromCurrency = "CHF"
    ..toCurrency = "BTC";

  http.Response response = await client.createPayementRequest(payment);
  var body = json.decode(response.body);

  response = await client.isChanged(body["Key"]);
  print(response.body);
}
0
likes
20
pub points
0%
popularity

Publisher

unverified uploader

Library for communicating with the BitcoinSuisse API

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

crypto, http

More

Packages that depend on suisse