Last active
July 12, 2020 20:17
-
-
Save nickhargreaves/54c2ef98e3bc3dbc0995033dffb241fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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