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.perspectivev3
|
||||
!/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",
|
||||
desc: "Debit or Credit Card",
|
||||
assetImage: "dark_powered_by_stripe.png",
|
||||
pay: stripePay,),
|
||||
pay: stripePay,
|
||||
),
|
||||
),
|
||||
|
||||
// e.g. add more here
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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 ------!>*/
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user