suisse 0.1.1 suisse: ^0.1.1 copied to clipboard
Library for communicating with the BitcoinSuisse API
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);
}