From b2cd1a7f28eb06c42b60386b717d76d416eaa775 Mon Sep 17 00:00:00 2001 From: Anthony Date: Sat, 28 Mar 2020 05:07:16 +0000 Subject: [PATCH] Changes and tweaks --- LabelStoreMax/.gitignore | 4 ++++ LabelStoreMax/lib/app_payment_methods.dart | 11 ++++++----- LabelStoreMax/lib/helpers/tools.dart | 5 ++++- LabelStoreMax/lib/labelconfig.dart | 6 +++--- LabelStoreMax/lib/pages/checkout_confirmation.dart | 3 ++- LabelStoreMax/lib/providers/stripe_pay.dart | 9 +++------ 6 files changed, 22 insertions(+), 16 deletions(-) diff --git a/LabelStoreMax/.gitignore b/LabelStoreMax/.gitignore index 2ddde2a..87ff8a6 100644 --- a/LabelStoreMax/.gitignore +++ b/LabelStoreMax/.gitignore @@ -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 diff --git a/LabelStoreMax/lib/app_payment_methods.dart b/LabelStoreMax/lib/app_payment_methods.dart index 3113994..15adf97 100644 --- a/LabelStoreMax/lib/app_payment_methods.dart +++ b/LabelStoreMax/lib/app_payment_methods.dart @@ -8,11 +8,12 @@ import 'package:label_storemax/providers/stripe_pay.dart'; List arrPaymentMethods = [ addPayment( PaymentType( - id: 1, - name: "Stripe", - desc: "Debit or Credit Card", - assetImage: "dark_powered_by_stripe.png", - pay: stripePay,), + id: 1, + name: "Stripe", + desc: "Debit or Credit Card", + assetImage: "dark_powered_by_stripe.png", + pay: stripePay, + ), ), // e.g. add more here diff --git a/LabelStoreMax/lib/helpers/tools.dart b/LabelStoreMax/lib/helpers/tools.dart index 4c3d86d..44d050d 100644 --- a/LabelStoreMax/lib/helpers/tools.dart +++ b/LabelStoreMax/lib/helpers/tools.dart @@ -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; diff --git a/LabelStoreMax/lib/labelconfig.dart b/LabelStoreMax/lib/labelconfig.dart index f70e5f8..cbfe1ed 100644 --- a/LabelStoreMax/lib/labelconfig.dart +++ b/LabelStoreMax/lib/labelconfig.dart @@ -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"; /**/ 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"]; /**/ diff --git a/LabelStoreMax/lib/pages/checkout_confirmation.dart b/LabelStoreMax/lib/pages/checkout_confirmation.dart index fc9a369..c9be328 100644 --- a/LabelStoreMax/lib/pages/checkout_confirmation.dart +++ b/LabelStoreMax/lib/pages/checkout_confirmation.dart @@ -30,7 +30,8 @@ class CheckoutConfirmationPage extends StatefulWidget { class CheckoutConfirmationPageState extends State { CheckoutConfirmationPageState(); - GlobalKey _key = GlobalKey(); + GlobalKey _key = + GlobalKey(); bool _showFullLoader; diff --git a/LabelStoreMax/lib/providers/stripe_pay.dart b/LabelStoreMax/lib/providers/stripe_pay.dart index e0288b1..3d4f9e4 100644 --- a/LabelStoreMax/lib/providers/stripe_pay.dart +++ b/LabelStoreMax/lib/providers/stripe_pay.dart @@ -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 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); }