Changes and tweaks

This commit is contained in:
Anthony 2020-03-28 05:07:16 +00:00
parent b3eef2047d
commit b2cd1a7f28
6 changed files with 22 additions and 16 deletions

View File

@ -71,3 +71,7 @@
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
/ios/Flutter/Flutter.podspec
/ios/Podfile.lock
/ios/Podfile

View File

@ -12,7 +12,8 @@ List<PaymentType> arrPaymentMethods = [
name: "Stripe",
desc: "Debit or Credit Card",
assetImage: "dark_powered_by_stripe.png",
pay: stripePay,),
pay: stripePay,
),
),
// e.g. add more here

View File

@ -192,7 +192,10 @@ bool isNumeric(String str) {
return double.tryParse(str) != null;
}
checkout(TaxRate taxRate, Function(String total, BillingDetails billingDetails, Cart cart) completeCheckout) async {
checkout(
TaxRate taxRate,
Function(String total, BillingDetails billingDetails, Cart cart)
completeCheckout) async {
String cartTotal = await CheckoutSession.getInstance
.total(withFormat: false, taxRate: taxRate);
BillingDetails billingDetails = CheckoutSession.getInstance.billingDetails;

View File

@ -23,7 +23,7 @@
const app_name = "MyApp";
const app_key =
"app_affb6434339b34443a297c2e40a3edab7102137e6d67de9abfe612b749bd";
"app key";
const app_logo_url = "https://woosignal.com/images/120x120_woosignal.png";
@ -33,7 +33,7 @@ const app_privacy_url = "https://yourdomain.com/privacy";
/*<! ------ STRIPE (OPTIONAL) ------!>*/
const app_stripe_account =
"acct_1DNNUgADlQ9NE89O"; // Your StripeAccount key from WooSignal
"Your Stripe Account"; // Your StripeAccount key from WooSignal
const app_stripe_live_mode = false; // SET true for live payments
@ -43,7 +43,7 @@ const app_currency_symbol = "\£";
const app_currency_iso = "gbp";
const app_locales_supported = ['en'];
const app_payment_methods = ["Stripe", "RazorPay"];
const app_payment_methods = ["Stripe"];
/*<! ------ DEBUGGER ENABLED ------!>*/

View File

@ -30,7 +30,8 @@ class CheckoutConfirmationPage extends StatefulWidget {
class CheckoutConfirmationPageState extends State<CheckoutConfirmationPage> {
CheckoutConfirmationPageState();
GlobalKey<CheckoutConfirmationPageState> _key = GlobalKey<CheckoutConfirmationPageState>();
GlobalKey<CheckoutConfirmationPageState> _key =
GlobalKey<CheckoutConfirmationPageState>();
bool _showFullLoader;

View File

@ -22,9 +22,7 @@ import 'package:woosignal/models/response/tax_rate.dart';
import 'package:woosignal_stripe/woosignal_stripe.dart';
stripePay(context,
{@required CheckoutConfirmationPageState state,
TaxRate taxRate}) async {
{@required CheckoutConfirmationPageState state, TaxRate taxRate}) async {
// CONFIGURE STRIPE
FlutterStripePayment.setStripeSettings(
stripeAccount: app_stripe_account, liveMode: app_stripe_live_mode);
@ -37,7 +35,6 @@ stripePay(context,
// CHECKOUT HELPER
await checkout(taxRate, (total, billingDetails, cart) async {
Map<String, dynamic> address = {
"name": billingDetails.billingAddress.nameFull(),
"line1": billingDetails.shippingAddress.addressLine,
@ -83,8 +80,8 @@ stripePay(context,
showEdgeAlertWith(
context,
title: trans(context, "Error"),
desc:
trans(context, "Something went wrong, please contact our store"),
desc: trans(
context, "Something went wrong, please contact our store"),
);
state.reloadState(showLoader: false);
}