Changes and tweaks
This commit is contained in:
parent
b3eef2047d
commit
b2cd1a7f28
4
LabelStoreMax/.gitignore
vendored
4
LabelStoreMax/.gitignore
vendored
@ -71,3 +71,7 @@
|
|||||||
!**/ios/**/default.pbxuser
|
!**/ios/**/default.pbxuser
|
||||||
!**/ios/**/default.perspectivev3
|
!**/ios/**/default.perspectivev3
|
||||||
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
|
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
|
||||||
|
|
||||||
|
/ios/Flutter/Flutter.podspec
|
||||||
|
/ios/Podfile.lock
|
||||||
|
/ios/Podfile
|
||||||
|
|||||||
@ -12,7 +12,8 @@ List<PaymentType> arrPaymentMethods = [
|
|||||||
name: "Stripe",
|
name: "Stripe",
|
||||||
desc: "Debit or Credit Card",
|
desc: "Debit or Credit Card",
|
||||||
assetImage: "dark_powered_by_stripe.png",
|
assetImage: "dark_powered_by_stripe.png",
|
||||||
pay: stripePay,),
|
pay: stripePay,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
// e.g. add more here
|
// e.g. add more here
|
||||||
|
|||||||
@ -192,7 +192,10 @@ bool isNumeric(String str) {
|
|||||||
return double.tryParse(str) != null;
|
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
|
String cartTotal = await CheckoutSession.getInstance
|
||||||
.total(withFormat: false, taxRate: taxRate);
|
.total(withFormat: false, taxRate: taxRate);
|
||||||
BillingDetails billingDetails = CheckoutSession.getInstance.billingDetails;
|
BillingDetails billingDetails = CheckoutSession.getInstance.billingDetails;
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
const app_name = "MyApp";
|
const app_name = "MyApp";
|
||||||
|
|
||||||
const app_key =
|
const app_key =
|
||||||
"app_affb6434339b34443a297c2e40a3edab7102137e6d67de9abfe612b749bd";
|
"app key";
|
||||||
|
|
||||||
const app_logo_url = "https://woosignal.com/images/120x120_woosignal.png";
|
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) ------!>*/
|
/*<! ------ STRIPE (OPTIONAL) ------!>*/
|
||||||
|
|
||||||
const app_stripe_account =
|
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
|
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_currency_iso = "gbp";
|
||||||
const app_locales_supported = ['en'];
|
const app_locales_supported = ['en'];
|
||||||
|
|
||||||
const app_payment_methods = ["Stripe", "RazorPay"];
|
const app_payment_methods = ["Stripe"];
|
||||||
|
|
||||||
/*<! ------ DEBUGGER ENABLED ------!>*/
|
/*<! ------ DEBUGGER ENABLED ------!>*/
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,8 @@ class CheckoutConfirmationPage extends StatefulWidget {
|
|||||||
class CheckoutConfirmationPageState extends State<CheckoutConfirmationPage> {
|
class CheckoutConfirmationPageState extends State<CheckoutConfirmationPage> {
|
||||||
CheckoutConfirmationPageState();
|
CheckoutConfirmationPageState();
|
||||||
|
|
||||||
GlobalKey<CheckoutConfirmationPageState> _key = GlobalKey<CheckoutConfirmationPageState>();
|
GlobalKey<CheckoutConfirmationPageState> _key =
|
||||||
|
GlobalKey<CheckoutConfirmationPageState>();
|
||||||
|
|
||||||
bool _showFullLoader;
|
bool _showFullLoader;
|
||||||
|
|
||||||
|
|||||||
@ -22,9 +22,7 @@ import 'package:woosignal/models/response/tax_rate.dart';
|
|||||||
import 'package:woosignal_stripe/woosignal_stripe.dart';
|
import 'package:woosignal_stripe/woosignal_stripe.dart';
|
||||||
|
|
||||||
stripePay(context,
|
stripePay(context,
|
||||||
{@required CheckoutConfirmationPageState state,
|
{@required CheckoutConfirmationPageState state, TaxRate taxRate}) async {
|
||||||
TaxRate taxRate}) async {
|
|
||||||
|
|
||||||
// CONFIGURE STRIPE
|
// CONFIGURE STRIPE
|
||||||
FlutterStripePayment.setStripeSettings(
|
FlutterStripePayment.setStripeSettings(
|
||||||
stripeAccount: app_stripe_account, liveMode: app_stripe_live_mode);
|
stripeAccount: app_stripe_account, liveMode: app_stripe_live_mode);
|
||||||
@ -37,7 +35,6 @@ stripePay(context,
|
|||||||
|
|
||||||
// CHECKOUT HELPER
|
// CHECKOUT HELPER
|
||||||
await checkout(taxRate, (total, billingDetails, cart) async {
|
await checkout(taxRate, (total, billingDetails, cart) async {
|
||||||
|
|
||||||
Map<String, dynamic> address = {
|
Map<String, dynamic> address = {
|
||||||
"name": billingDetails.billingAddress.nameFull(),
|
"name": billingDetails.billingAddress.nameFull(),
|
||||||
"line1": billingDetails.shippingAddress.addressLine,
|
"line1": billingDetails.shippingAddress.addressLine,
|
||||||
@ -83,8 +80,8 @@ stripePay(context,
|
|||||||
showEdgeAlertWith(
|
showEdgeAlertWith(
|
||||||
context,
|
context,
|
||||||
title: trans(context, "Error"),
|
title: trans(context, "Error"),
|
||||||
desc:
|
desc: trans(
|
||||||
trans(context, "Something went wrong, please contact our store"),
|
context, "Something went wrong, please contact our store"),
|
||||||
);
|
);
|
||||||
state.reloadState(showLoader: false);
|
state.reloadState(showLoader: false);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user