Skip to content

Instantly share code, notes, and snippets.

@nickhargreaves
Last active July 12, 2020 20:17
Show Gist options
  • Save nickhargreaves/54c2ef98e3bc3dbc0995033dffb241fc to your computer and use it in GitHub Desktop.
Save nickhargreaves/54c2ef98e3bc3dbc0995033dffb241fc to your computer and use it in GitHub Desktop.
import 'package:beyonic_flutter_library/beyonicservice.dart';
import 'package:beyonic_flutter_library/models/payments.dart';
beyonic_service = BeyonicService(apiKey: your_api_key);
// load list of payments
Future <List<Payment>> _payments = beyonic_service.load(Payment.all, offset: 0);
// load single payment
Future <Payment> _payment = beyonic_service.load(Payment.single);
// create payment
Map<String, String> params = {
"phonenumber": "+80000000001",
"first_name": "Kennedy",
"last_name": "Amani",
"amount": "100.2",
"currency": "BXC",
"description": "Per diem payment34",
"payment_type": "money",
"callback_url": "https://my.website/payments/callback"
};
Future <Payment> _payment = beyonic_service.create(Payment.create, params);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment