From 5bd16b945a57b30178b6d3384379b68aa32fd55b Mon Sep 17 00:00:00 2001 From: Anthony Date: Tue, 2 Nov 2021 21:16:28 +0000 Subject: [PATCH] v5.3.0 - Ability to update payment providers via WooSignal Dashboard, Pubspec.yaml dependency updates --- LabelStoreMax/.env | 12 +++--- LabelStoreMax/CHANGELOG.md | 35 +++++++++------- LabelStoreMax/README.md | 4 +- LabelStoreMax/lang/de.json | 3 +- LabelStoreMax/lang/en.json | 3 +- LabelStoreMax/lang/es.json | 3 +- LabelStoreMax/lang/fr.json | 3 +- LabelStoreMax/lang/hi.json | 3 +- LabelStoreMax/lang/it.json | 3 +- LabelStoreMax/lang/pt.json | 3 +- LabelStoreMax/lang/zh.json | 3 +- .../lib/app/providers/stripe_pay.dart | 16 ++++++-- LabelStoreMax/lib/bootstrap/helpers.dart | 41 +++++++++++++------ LabelStoreMax/lib/config/app_locale.dart | 5 --- .../lib/config/app_payment_gateways.dart | 2 +- LabelStoreMax/lib/config/app_theme.dart | 2 +- LabelStoreMax/lib/main.dart | 8 +--- LabelStoreMax/lib/resources/pages/cart.dart | 10 ++--- .../pages/checkout_confirmation.dart | 2 +- .../pages/checkout_payment_type.dart | 15 +++++-- .../lib/resources/pages/product_detail.dart | 12 +++--- .../resources/widgets/checkout_paypal.dart | 6 +-- LabelStoreMax/pubspec.lock | 14 +++---- LabelStoreMax/pubspec.yaml | 10 ++--- 24 files changed, 128 insertions(+), 90 deletions(-) diff --git a/LabelStoreMax/.env b/LabelStoreMax/.env index dc68393..9c54474 100644 --- a/LabelStoreMax/.env +++ b/LabelStoreMax/.env @@ -10,7 +10,7 @@ ASSET_PATH_IMAGES="public/assets/images" TIMEZONE="UTC" # ** -DEFAULT_LOCALE="en" +DEFAULT_LOCALE=null # supports: "en" (English), "es" (Spanish), "fr" (French), "hi" (Hindi), "it" (Italian), "pt" (Portuguese) or "zh" (Simplified Chinese) # ** @@ -20,10 +20,10 @@ APP_KEY="your app key" # ** -STRIPE_ACCOUNT="Stripe account key from WooSignal" +STRIPE_ACCOUNT=null # Stripe account key from WooSignal https://woosignal.com/dashboard -STRIPE_COUNTRY_CODE="GB" +STRIPE_COUNTRY_CODE=null # Alpha-2 country code list: https://www.iban.com/country-codes STRIPE_LIVE_MODE=null @@ -31,11 +31,11 @@ STRIPE_LIVE_MODE=null # ** -PAYPAL_ACCOUNT_EMAIL="mystore@business.com" +PAYPAL_ACCOUNT_EMAIL=null # Your PayPal account email e.g. mystore@business.com -PAYPAL_LIVE_MODE="false" +PAYPAL_LIVE_MODE=null # Change to 'true' for live payments -PAYPAL_LOCALE="en-GB" +PAYPAL_LOCALE=null # Use BCP-47 code from this link https://developer.paypal.com/docs/api/reference/locale-codes/ # ** diff --git a/LabelStoreMax/CHANGELOG.md b/LabelStoreMax/CHANGELOG.md index 2275ca1..ea72de3 100644 --- a/LabelStoreMax/CHANGELOG.md +++ b/LabelStoreMax/CHANGELOG.md @@ -1,8 +1,13 @@ -## [5.2.1] - 2020-10-13 +## [5.3.0] - 2021-11-02 + +* Ability to update payment providers via WooSignal Dashboard +* Pubspec.yaml dependency updates + +## [5.2.1] - 2021-10-13 * Bug fixes -## [5.2.0] - 2020-10-12 +## [5.2.0] - 2021-10-12 * Migrate to Nylo 2.1.0 * Use flutter_stripe library for payments @@ -11,47 +16,47 @@ * Android compileSdkVersion 30 * Bug fixes -## [5.1.0] - 2020-07-19 +## [5.1.0] - 2021-07-19 * Add support for simplified Chinese locale (zh) * Add ability to change language from WooSignal dashboard -## [5.0.7] - 2020-07-08 +## [5.0.7] - 2021-07-08 * Pubspec.yaml dependency updates -## [5.0.6] - 2020-07-08 +## [5.0.6] - 2021-07-08 * Refactor project to use Nylo v1.0.0 * Pubspec.yaml dependency updates -## [5.0.5] - 2020-05-03 +## [5.0.5] - 2021-05-03 * Add NSCameraUsageDescription meta to plist for IOS -## [5.0.4] - 2020-04-30 +## [5.0.4] - 2021-04-30 * Fix IOS build failing with Stripe * Pubspec.yaml dependency updates -## [5.0.3] - 2020-04-27 +## [5.0.3] - 2021-04-27 * Fix issue account page when logged in for Notic theme * Small tweak to helpers.dart * Pubspec.yaml dependency updates -## [5.0.2] - 2020-04-17 +## [5.0.2] - 2021-04-17 * Fix issue with PayPal checkout when using different locales * Fix nested `trans` methods * PAYPAL_LOCALE added to .env file -## [5.0.1] - 2020-04-13 +## [5.0.1] - 2021-04-13 * Update to app_payment_gateways * Pubspec.yaml dependency updates -## [5.0.0] - 2020-04-11 +## [5.0.0] - 2021-04-11 * Major release * Null safety libraries added @@ -62,7 +67,7 @@ * Pubspec.yaml dependency updates * Bug fixes -## [4.0.0] - 2020-03-28 +## [4.0.0] - 2021-03-28 * Major release * New config structure @@ -74,7 +79,7 @@ * Dart code formatted * Pubspec.yaml dependency updates -## [3.0.0] - 2020-03-08 +## [3.0.0] - 2021-03-08 * Major release * Flutter 2.0.0+ support @@ -82,14 +87,14 @@ * Code tidy up * Bug fixes -## [2.6.0] - 2020-02-24 +## [2.6.0] - 2021-02-24 * Ability to manage affiliate products * Refreshed design for checkout details screen * New logic to manage shipping better * Bug fixes -## [2.5.1] - 2020-02-21 +## [2.5.1] - 2021-02-21 * Pubspec.yaml dependency updates * Bug fixes diff --git a/LabelStoreMax/README.md b/LabelStoreMax/README.md index 1111b89..f6e5929 100644 --- a/LabelStoreMax/README.md +++ b/LabelStoreMax/README.md @@ -4,7 +4,7 @@ # WooCommerce App: Label StoreMax -### Label StoreMax - v5.2.1 +### Label StoreMax - v5.3.0 [Official WooSignal WooCommerce App](https://woosignal.com) @@ -35,7 +35,7 @@ You can also upload the app to the IOS app store and Google play store using Flu 2. Sign up for free on [WooSignal](https://woosignal.com) and link your WooCommerce store 3. Add your app key into the **.env** file and hit play (with Android Studio) to build the app 🥳 -Full documentation this available [here](https://woosignal.com/docs/app/ios/label-storemax) +Full documentation this available [here](https://woosignal.com/docs/app/label-storemax) ## Some features integrated diff --git a/LabelStoreMax/lang/de.json b/LabelStoreMax/lang/de.json index 8612163..28df22b 100644 --- a/LabelStoreMax/lang/de.json +++ b/LabelStoreMax/lang/de.json @@ -185,5 +185,6 @@ "The payment has been cancelled": "Die Zahlung wurde storniert", "Must have": "Haben müssen", "Our selection of new items": "Unsere Auswahl an Neuheiten", - "Register": "Registrieren" + "Register": "Registrieren", + "No payment methods are available": "Es sind keine Zahlungsmethoden verfügbar" } \ No newline at end of file diff --git a/LabelStoreMax/lang/en.json b/LabelStoreMax/lang/en.json index 79a77da..a033ac5 100644 --- a/LabelStoreMax/lang/en.json +++ b/LabelStoreMax/lang/en.json @@ -185,5 +185,6 @@ "The payment has been cancelled": "The payment has been cancelled", "Must have": "Must have", "Our selection of new items": "Our selection of new items", - "Register": "Register" + "Register": "Register", + "No payment methods are available": "No payment methods are available" } \ No newline at end of file diff --git a/LabelStoreMax/lang/es.json b/LabelStoreMax/lang/es.json index 11fff15..475844c 100644 --- a/LabelStoreMax/lang/es.json +++ b/LabelStoreMax/lang/es.json @@ -185,5 +185,6 @@ "The payment has been cancelled": "El pago ha sido cancelado", "Must have": "Debe tener", "Our selection of new items": "Nuestra selección de novedades", - "Register": "Registrarse" + "Register": "Registrarse", + "No payment methods are available": "No hay métodos de pago disponibles." } \ No newline at end of file diff --git a/LabelStoreMax/lang/fr.json b/LabelStoreMax/lang/fr.json index e64e1e7..8f0bd0e 100644 --- a/LabelStoreMax/lang/fr.json +++ b/LabelStoreMax/lang/fr.json @@ -185,5 +185,6 @@ "The payment has been cancelled": "Le paiement a été annulé", "Must have": "Doit avoir", "Our selection of new items": "Notre sélection de nouveautés", - "Register": "S'inscrire" + "Register": "S'inscrire", + "No payment methods are available": "Aucun mode de paiement n'est disponible" } \ No newline at end of file diff --git a/LabelStoreMax/lang/hi.json b/LabelStoreMax/lang/hi.json index 95f91d3..0666134 100644 --- a/LabelStoreMax/lang/hi.json +++ b/LabelStoreMax/lang/hi.json @@ -185,5 +185,6 @@ "The payment has been cancelled": "bhugataan radd kar diya gaya hai", "Must have": "hona aavashyak hai", "Our selection of new items": "naee vastuon ka hamaara chayan", - "Register": "rajistar karen" + "Register": "rajistar karen", + "No payment methods are available": "koee bhugataan vidhiyaan upalabdh nahin hain" } \ No newline at end of file diff --git a/LabelStoreMax/lang/it.json b/LabelStoreMax/lang/it.json index 317bfc1..8b69027 100644 --- a/LabelStoreMax/lang/it.json +++ b/LabelStoreMax/lang/it.json @@ -185,5 +185,6 @@ "The payment has been cancelled": "Il pagamento è stato annullato", "Must have": "Deve avere", "Our selection of new items": "La nostra selezione di nuovi articoli", - "Register": "Registrati" + "Register": "Registrati", + "No payment methods are available": "Non sono disponibili metodi di pagamento" } \ No newline at end of file diff --git a/LabelStoreMax/lang/pt.json b/LabelStoreMax/lang/pt.json index ba1ef19..8acdf3c 100644 --- a/LabelStoreMax/lang/pt.json +++ b/LabelStoreMax/lang/pt.json @@ -185,5 +185,6 @@ "The payment has been cancelled": "O pagamento foi cancelado", "Must have": "Deve ter", "Our selection of new items": "Nossa seleção de novos itens", - "Register": "Registro" + "Register": "Registro", + "No payment methods are available": "Nenhum método de pagamento disponível" } \ No newline at end of file diff --git a/LabelStoreMax/lang/zh.json b/LabelStoreMax/lang/zh.json index bdb70f5..f964c08 100644 --- a/LabelStoreMax/lang/zh.json +++ b/LabelStoreMax/lang/zh.json @@ -185,5 +185,6 @@ "The payment has been cancelled": "付款已取消", "Must have": "一定有", "Our selection of new items": "我们精选的新品", - "Register": "登记" + "Register": "登记", + "No payment methods are available": "没有可用的付款方式" } \ No newline at end of file diff --git a/LabelStoreMax/lib/app/providers/stripe_pay.dart b/LabelStoreMax/lib/app/providers/stripe_pay.dart index fde00f9..557d3da 100644 --- a/LabelStoreMax/lib/app/providers/stripe_pay.dart +++ b/LabelStoreMax/lib/app/providers/stripe_pay.dart @@ -34,8 +34,15 @@ stripePay(context, : getEnv('STRIPE_LIVE_MODE', defaultValue: false); // CONFIGURE STRIPE - Stripe.stripeAccountId = getEnv('STRIPE_ACCOUNT'); + Stripe.stripeAccountId = getEnv('STRIPE_ACCOUNT') == null ? wooSignalApp.stripeAccount : getEnv('STRIPE_ACCOUNT'); + Stripe.publishableKey = liveMode ? "pk_live_IyS4Vt86L49jITSfaUShumzi" : "pk_test_0jMmpBntJ6UkizPkfiB8ZJxH"; // Don't change this value + await Stripe.instance.applySettings(); + + if (Stripe.stripeAccountId == '') { + NyLogger.error('You need to connect your Stripe account to WooSignal via the dashboard https://woosignal.com/dashboard'); + return; + } try { dynamic rsp = {}; @@ -77,8 +84,8 @@ stripePay(context, googlePay: false, style: Theme.of(state.context).brightness == Brightness.light ? ThemeMode.light : ThemeMode.dark, testEnv: liveMode, - merchantCountryCode: getEnv('STRIPE_COUNTRY_CODE', defaultValue: 'GB'), - merchantDisplayName: getEnv('APP_NAME'), + merchantCountryCode: envVal('STRIPE_COUNTRY_CODE', defaultValue: wooSignalApp.stripeCountryCode), + merchantDisplayName: envVal('APP_NAME', defaultValue: wooSignalApp.appName), paymentIntentClientSecret: rsp['client_secret'], )); @@ -103,6 +110,9 @@ stripePay(context, Navigator.pushNamed(context, "/checkout-status", arguments: order); } on StripeException catch(e) { + if (getEnv('APP_DEBUG', defaultValue: true)) { + NyLogger.error(e.error.message); + } showToastNotification( context, title: trans(context, "Oops!"), diff --git a/LabelStoreMax/lib/bootstrap/helpers.dart b/LabelStoreMax/lib/bootstrap/helpers.dart index c9393f4..a6038ed 100644 --- a/LabelStoreMax/lib/bootstrap/helpers.dart +++ b/LabelStoreMax/lib/bootstrap/helpers.dart @@ -52,24 +52,41 @@ appWooSignal(Function(WooSignal) api) async { return await api(wooSignal); } -List getPaymentTypes() => - paymentTypeList.where((v) => v != null).toList(); +List getPaymentTypes() { + List paymentTypes = []; + app_payment_gateways.forEach((element) { + if (paymentTypes.firstWhere((paymentType) => paymentType.name != element, orElse: () => null) == null) { + paymentTypes.add(paymentTypeList.firstWhere((paymentTypeList) => paymentTypeList.name == element, orElse: () => null)); + } + }); + + if (!app_payment_gateways.contains('Stripe') && AppHelper.instance.appConfig.stripeEnabled == true) { + paymentTypes.add(paymentTypeList.firstWhere((element) => element.name == "Stripe", orElse: () => null)); + } + if (!app_payment_gateways.contains('PayPal') && AppHelper.instance.appConfig.paypalEnabled == true) { + paymentTypes.add(paymentTypeList.firstWhere((element) => element.name == "PayPal", orElse: () => null)); + } + if (!app_payment_gateways.contains('CashOnDelivery') && AppHelper.instance.appConfig.codEnabled == true) { + paymentTypes.add(paymentTypeList.firstWhere((element) => element.name == "CashOnDelivery", orElse: () => null)); + } + + return paymentTypes.where((v) => v != null).toList(); +} + +dynamic envVal(String envVal, {dynamic defaultValue}) => (getEnv(envVal) == null ? defaultValue : getEnv(envVal)); PaymentType addPayment( {@required int id, @required String name, @required String desc, @required String assetImage, - @required Function pay}) => - app_payment_gateways.contains(name) - ? PaymentType( - id: id, - name: name, - desc: desc, - assetImage: assetImage, - pay: pay, - ) - : null; + @required Function pay}) => PaymentType( + id: id, + name: name, + desc: desc, + assetImage: assetImage, + pay: pay, + ); showStatusAlert(context, {@required String title, String subtitle, IconData icon, int duration}) { diff --git a/LabelStoreMax/lib/config/app_locale.dart b/LabelStoreMax/lib/config/app_locale.dart index da4fe76..5c60901 100644 --- a/LabelStoreMax/lib/config/app_locale.dart +++ b/LabelStoreMax/lib/config/app_locale.dart @@ -5,15 +5,10 @@ import 'package:flutter/cupertino.dart'; | APP LOCALE | | Configure the language by setting the locale. -| -| e.g. Change app_locale = Locale('es'); for Spanish. | You can only use one of the supported locales below in app_locales_supported. |-------------------------------------------------------------------------- */ -const Locale app_locale = null; // by default it will use the "DEFAULT_LOCALE" value from the /.env -// const Locale app_locale = Locale('en'); // uncomment to change the locale here too. - const List app_locales_supported = [ Locale('en'), Locale('es'), diff --git a/LabelStoreMax/lib/config/app_payment_gateways.dart b/LabelStoreMax/lib/config/app_payment_gateways.dart index 146f328..3907872 100644 --- a/LabelStoreMax/lib/config/app_payment_gateways.dart +++ b/LabelStoreMax/lib/config/app_payment_gateways.dart @@ -13,7 +13,7 @@ import 'package:flutter_app/bootstrap/helpers.dart'; |-------------------------------------------------------------------------- */ -const app_payment_gateways = ["Stripe", "CashOnDelivery", "PayPal"]; +const app_payment_gateways = []; // Available: "Stripe", "CashOnDelivery", "PayPal" // e.g. app_payment_gateways = ["Stripe", "CashOnDelivery"]; will only use Stripe and Cash on Delivery. diff --git a/LabelStoreMax/lib/config/app_theme.dart b/LabelStoreMax/lib/config/app_theme.dart index 8340c67..550d2f1 100644 --- a/LabelStoreMax/lib/config/app_theme.dart +++ b/LabelStoreMax/lib/config/app_theme.dart @@ -16,7 +16,7 @@ import 'package:google_fonts/google_fonts.dart'; |-------------------------------------------------------------------------- */ -final TextStyle appThemeFont = GoogleFonts.overpass(); +final TextStyle appThemeFont = GoogleFonts.poppins(); // e.g. custom font in pubspec.yaml - https://flutter.dev/docs/cookbook/design/fonts // final TextStyle appThemeFont = TextStyle(fontFamily: "ZenTokyoZoo"); diff --git a/LabelStoreMax/lib/main.dart b/LabelStoreMax/lib/main.dart index b394c8a..4d446bf 100644 --- a/LabelStoreMax/lib/main.dart +++ b/LabelStoreMax/lib/main.dart @@ -23,7 +23,7 @@ void main() async { String initialRoute = '/no-connection'; WooSignalApp wooSignalApp = await appWooSignal((api) => api.getApp()); - Locale locale = app_locale; + Locale locale; if (wooSignalApp != null) { initialRoute = "/home"; @@ -38,11 +38,7 @@ void main() async { ); } - if (locale == null && wooSignalApp.locale != null) { - locale = Locale(wooSignalApp.locale); - } else { - locale = Locale(getEnv('DEFAULT_LOCALE', defaultValue: 'en')); - } + locale = Locale((getEnv('DEFAULT_LOCALE', defaultValue: null) == null && wooSignalApp.locale != null) ? wooSignalApp.locale : envVal('DEFAULT_LOCALE', defaultValue: 'en')); } runApp( diff --git a/LabelStoreMax/lib/resources/pages/cart.dart b/LabelStoreMax/lib/resources/pages/cart.dart index cb47109..bcac3d8 100644 --- a/LabelStoreMax/lib/resources/pages/cart.dart +++ b/LabelStoreMax/lib/resources/pages/cart.dart @@ -44,19 +44,19 @@ class _CartPageState extends State { _cartCheck() async { List cart = await Cart.getInstance.getCart(); - if (cart.length <= 0) { + if (cart.length == 0) { setState(() { _isLoading = false; - _isCartEmpty = (cart.length <= 0) ? true : false; + _isCartEmpty = true; }); - return []; + return; } List> cartJSON = cart.map((c) => c.toJson()).toList(); List cartRes = await appWooSignal((api) => api.cartCheck(cartJSON)); - if (cartRes.length <= 0) { + if (cartRes.length == 0) { Cart.getInstance.saveCartToPref(cartLineItems: []); setState(() { _isCartEmpty = true; @@ -80,7 +80,7 @@ class _CartPageState extends State { return; } - if (cartLineItems.length <= 0) { + if (cartLineItems.length == 0) { showToastNotification( context, title: trans(context, "Cart"), diff --git a/LabelStoreMax/lib/resources/pages/checkout_confirmation.dart b/LabelStoreMax/lib/resources/pages/checkout_confirmation.dart index 40c4216..a766818 100644 --- a/LabelStoreMax/lib/resources/pages/checkout_confirmation.dart +++ b/LabelStoreMax/lib/resources/pages/checkout_confirmation.dart @@ -443,7 +443,7 @@ class CheckoutConfirmationPageState extends State { _isProcessingPayment = true; }); - CheckoutSession.getInstance.paymentType + await CheckoutSession.getInstance.paymentType .pay(context, state: this, taxRate: _taxRate); Future.delayed(Duration(milliseconds: 5000), () { diff --git a/LabelStoreMax/lib/resources/pages/checkout_payment_type.dart b/LabelStoreMax/lib/resources/pages/checkout_payment_type.dart index 5470ae0..d65f094 100644 --- a/LabelStoreMax/lib/resources/pages/checkout_payment_type.dart +++ b/LabelStoreMax/lib/resources/pages/checkout_payment_type.dart @@ -16,6 +16,7 @@ import 'package:flutter_app/bootstrap/helpers.dart'; import 'package:flutter_app/config/app_theme.dart'; import 'package:flutter_app/resources/widgets/buttons.dart'; import 'package:flutter_app/resources/widgets/woosignal_ui.dart'; +import 'package:nylo_framework/nylo_framework.dart'; import 'package:nylo_support/helpers/helper.dart'; class CheckoutPaymentTypePage extends StatefulWidget { @@ -42,7 +43,10 @@ class _CheckoutPaymentTypePageState extends State { @override Widget build(BuildContext context) { - + List paymentTypes = getPaymentTypes(); + if (paymentTypes.length == 0 && getEnv('APP_DEBUG', defaultValue: false) == true) { + NyLogger.info('You have no payment methods set. Visit the WooSignal dashboard (https://woosignal.com/dashboard) to set a payment method.'); + } return Scaffold( resizeToAvoidBottomInset: false, appBar: AppBar( @@ -75,11 +79,14 @@ class _CheckoutPaymentTypePageState extends State { mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ Expanded( - child: ListView.separated( - itemCount: getPaymentTypes().length, + child: paymentTypes.length == 0 ? Container( + padding: EdgeInsets.only(top: 20), + child: Text(trans(context, "No payment methods are available"), style: Theme.of(context).textTheme.bodyText1,), + ) : ListView.separated( + itemCount: paymentTypes.length, itemBuilder: (BuildContext context, int index) { PaymentType paymentType = - getPaymentTypes()[index]; + paymentTypes[index]; return ListTile( contentPadding: EdgeInsets.only( top: 10, diff --git a/LabelStoreMax/lib/resources/pages/product_detail.dart b/LabelStoreMax/lib/resources/pages/product_detail.dart index 9436428..8384d65 100644 --- a/LabelStoreMax/lib/resources/pages/product_detail.dart +++ b/LabelStoreMax/lib/resources/pages/product_detail.dart @@ -148,6 +148,7 @@ class _ProductDetailState extends NyState { } _modalBottomSheetAttributes() { + WS.ProductVariation productVariation = findProductVariation(); wsModalBottom( context, title: trans(context, "Options"), @@ -182,18 +183,18 @@ class _ProductDetailState extends NyState { child: Column( children: [ Text( - (findProductVariation() != null - ? "${trans(context, "Price")}: ${formatStringCurrency(total: findProductVariation().price)}" + (productVariation != null + ? "${trans(context, "Price")}: ${formatStringCurrency(total: productVariation.price)}" : (((_product.attributes.length == _tmpAttributeObj.values.length) && - findProductVariation() == null) + productVariation == null) ? trans(context, "This variation is unavailable") : trans(context, "Choose your options"))), style: Theme.of(context).textTheme.subtitle1, ), Text( - (findProductVariation() != null - ? findProductVariation().stockStatus != "instock" + (productVariation != null + ? productVariation.stockStatus != "instock" ? trans(context, "Out of stock") : "" : ""), @@ -212,7 +213,6 @@ class _ProductDetailState extends NyState { return; } - WS.ProductVariation productVariation = findProductVariation(); if (productVariation == null) { showToastNotification(context, title: trans(context, "Oops"), diff --git a/LabelStoreMax/lib/resources/widgets/checkout_paypal.dart b/LabelStoreMax/lib/resources/widgets/checkout_paypal.dart index ac8a012..01022cc 100644 --- a/LabelStoreMax/lib/resources/widgets/checkout_paypal.dart +++ b/LabelStoreMax/lib/resources/widgets/checkout_paypal.dart @@ -77,7 +77,7 @@ class WebViewState extends NyState { } String getPayPalUrl() { - bool liveMode = getEnv('PAYPAL_LIVE_MODE', defaultValue: false); + bool liveMode = envVal('PAYPAL_LIVE_MODE', defaultValue: _wooSignalApp.paypalLiveMode); return liveMode == true ? "https://www.paypal.com/cgi-bin/webscr" : "https://www.sandbox.paypal.com/cgi-bin/webscr"; @@ -115,9 +115,9 @@ class WebViewState extends NyState {
- + - + diff --git a/LabelStoreMax/pubspec.lock b/LabelStoreMax/pubspec.lock index f8bbe9d..3c06c35 100644 --- a/LabelStoreMax/pubspec.lock +++ b/LabelStoreMax/pubspec.lock @@ -49,7 +49,7 @@ packages: name: auto_size_text url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "3.0.0" boolean_selector: dependency: transitive description: @@ -168,7 +168,7 @@ packages: name: dio url: "https://pub.dartlang.org" source: hosted - version: "4.0.0" + version: "4.0.1" fake_async: dependency: transitive description: @@ -276,7 +276,7 @@ packages: name: flutter_stripe url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.1" flutter_styled_toast: dependency: "direct main" description: @@ -573,7 +573,7 @@ packages: name: shared_preferences url: "https://pub.dartlang.org" source: hosted - version: "2.0.7" + version: "2.0.8" shared_preferences_linux: dependency: transitive description: @@ -732,7 +732,7 @@ packages: name: uuid url: "https://pub.dartlang.org" source: hosted - version: "3.0.4" + version: "3.0.5" vector_math: dependency: transitive description: @@ -788,7 +788,7 @@ packages: name: woosignal url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.2.1" wp_json_api: dependency: "direct main" description: @@ -818,5 +818,5 @@ packages: source: hosted version: "3.1.0" sdks: - dart: ">=2.14.0 <3.0.0" + dart: ">=2.14.4 <3.0.0" flutter: ">=2.5.0" diff --git a/LabelStoreMax/pubspec.yaml b/LabelStoreMax/pubspec.yaml index 589aca6..7b3b76e 100644 --- a/LabelStoreMax/pubspec.yaml +++ b/LabelStoreMax/pubspec.yaml @@ -1,10 +1,10 @@ # Official WooSignal App Template for WooCommerce # Label StoreMax -# Version: 5.2.1 +# Version: 5.3.0 # Author: Anthony Gordon # Homepage: https://woosignal.com -# Documentation: https://woosignal.com/docs/app/ios/label-storemax +# Documentation: https://woosignal.com/docs/app/label-storemax ### Change App Icon # 1 Replace: public/assets/icon/appicon.png (1024px1024px icon size) @@ -30,8 +30,8 @@ dependencies: intl: ^0.17.0 page_transition: ^2.0.4 nylo_framework: ^2.0.4 - woosignal: ^2.1.0 - flutter_stripe: ^2.0.0 + woosignal: ^2.2.1 + flutter_stripe: ^2.0.1 wp_json_api: ^3.1.3 cached_network_image: ^3.1.0 package_info: ^2.0.2 @@ -48,7 +48,7 @@ dependencies: math_expressions: ^2.2.0 hexcolor: ^2.0.5 flutter_spinkit: ^5.1.0 - auto_size_text: ^2.1.0 + auto_size_text: ^3.0.0 html: ^0.15.0 flutter_staggered_grid_view: ^0.4.1 flutter: