This package makes it easy to use the Bambara in a flutter project. Making it super easy to accept Orange Money and Wave Payment in your App.
Add the package to your pubspec.yml file
bambara_flutter: ^0.0.1
import 'package:bambara_flutter/bambara_flutter.dart';
...
onPressed: () async {
await BambaraView(
data: BambaraData(
amount: 1000,
reference: "21e5ysuiadjaksd",
phone: "778909878",
email: "bass@gmail.com",
name: "Bassirou",
publicKey: "pk_IuR83FabBsxW2P6mHPJywyGljga9QcFg",),
onClosed: () => print("CLOSED"),
onError: (data) => print(data),
onSuccess: (data) => print("SUCCESS HERE"),
onProcessing: (data) => print("Processing HERE"),
onRedirect: (data) => print("REDIRECT HERE"),
closeOnComplete: false // Default value True. if True close the BambaraView widget automatically after calling onSuccess or onError
).show(context);
},
...
{
slug: 5befed32-3784-4992-96b6-ffa3b088751b,
status: success,
fees: 4,
amount: 200,
currency: xof,
wallet_reference: null,
reference: 1E6oqPJ4Wn61mzOYXzAoBaQLdhl15V,
customer: {
name: Bassirou,
email: bass@gmail.com,
phone: 786338816
},
link: https://bambara.coinhub.africa/payments/5befed32-3784-4992-96b6-ffa3b088751b,
webhook: {
ipn: null,
success_url: https://example.com/success,
cancel_url: https://example.com/cancel,
failure_url: https://example.com/failure ,
home_url: https://example.com},
products: [],
extras: {wallet_url: }
}
}
{
slug: 5befed32-3784-4992-96b6-ffa3b088751b,
status: failed,
fees: 4,
amount: 200,
currency: xof,
wallet_reference: null,
reference: 1E6oqPJ4Wn61mzOYXzAoBaQLdhl15V,
customer: {
name: Bassirou,
email: bass@gmail.com,
phone: 786338816
},
link: https://bambara.coinhub.africa/payments/5befed32-3784-4992-96b6-ffa3b088751b,
webhook: {
ipn: null,
success_url: https://example.com/success,
cancel_url: https://example.com/cancel,
failure_url: https://example.com/failure ,
home_url: https://example.com},
products: [],
extras: {wallet_url: }
}
}