flutterwave-flutter icon indicating copy to clipboard operation
flutterwave-flutter copied to clipboard

flutterwave standard

Open nebotaismael opened this issue 1 year ago • 0 comments

{status: error, success: false, transaction_id: null, tx_ref: c4cfb400-acac-1e50-9d64-cd7f6ea96a6b} returns me that error when using the package on flutter

// ignore_for_file: use_build_context_synchronously

import 'package:flutter/material.dart'; import 'package:flutterwave_standard/flutterwave.dart'; import 'package:uuid/uuid.dart';

payMentAPI( String amount, BuildContext context, String email, String name) async { final Customer customer = Customer(email: email, name: name);

final Flutterwave flutterwave = Flutterwave( context: context, publicKey: 'key here', currency: 'XAF', redirectUrl: 'http://localhost:7357', txRef: Uuid().v1(), amount: amount, customer: customer, paymentOptions: "card", customization: Customization(title: "FETech Commerce"), isTestMode: true); final ChargeResponse response = await flutterwave.charge();

showLoading(response.toString(), context); print("${response.toJson()}"); }

Future showLoading(String message, BuildContext context) { return showDialog( context: context, barrierDismissible: true, builder: (BuildContext context) { return AlertDialog( content: Container( margin: EdgeInsets.fromLTRB(30, 20, 30, 20), width: double.infinity, height: 50, child: Text(message), ), ); }, ); }

nebotaismael avatar Jan 12 '24 03:01 nebotaismael