some progress in cloud sync and paypal support almost done
This commit is contained in:
@@ -98,11 +98,48 @@ class PlusPlanCard extends StatelessWidget {
|
||||
onTap: () {
|
||||
// pop dialog
|
||||
Navigator.of(context).pop();
|
||||
// start payment process
|
||||
Navigator.of(context)
|
||||
.push(MaterialPageRoute(builder: (context) {
|
||||
return PremiumActivationView(product: id);
|
||||
}));
|
||||
// show payment option selector
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12.0)),
|
||||
title: Text('payment_method'.i18n),
|
||||
content: Text('select_payment_method'.i18n),
|
||||
actions: [
|
||||
ActionButton(
|
||||
label: "stripe".i18n,
|
||||
onTap: () {
|
||||
// pop dialog
|
||||
Navigator.of(context).pop();
|
||||
// start payment process
|
||||
Navigator.of(context)
|
||||
.push(MaterialPageRoute(builder: (context) {
|
||||
return PremiumActivationView(
|
||||
product: id,
|
||||
paymentProvider: "stripe",
|
||||
);
|
||||
}));
|
||||
},
|
||||
),
|
||||
ActionButton(
|
||||
label: "paypal".i18n,
|
||||
onTap: () {
|
||||
// pop dialog
|
||||
Navigator.of(context).pop();
|
||||
// start payment process
|
||||
Navigator.of(context)
|
||||
.push(MaterialPageRoute(builder: (context) {
|
||||
return PremiumActivationView(
|
||||
product: id,
|
||||
paymentProvider: "paypal",
|
||||
);
|
||||
}));
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
|
||||
@@ -47,11 +47,16 @@ extension SettingsLocalization on String {
|
||||
"rfp_16": "Private leaks and informations about upcoming features",
|
||||
"rfp_17": "Grade exporting",
|
||||
"rfp_18": "Viewing exported grades",
|
||||
// docs popup
|
||||
// docs and payment method popup
|
||||
"docs": "Documents",
|
||||
"docs_acceptance":
|
||||
"By pressing the \"Next\" button, you accept reFilc's Terms and Conditions for subscriptions (available at the following link: filc.one/pay-terms) and our Privacy Policy (available at the following link: filc.one/pay-privacy).",
|
||||
"next": "Next",
|
||||
"payment_method": "Payment Method",
|
||||
"select_payment_method":
|
||||
"Please select a preferred payment method! Credit card payments are handled by Stripe, which also supports Apple Pay, Google Pay and Revolut Pay.",
|
||||
"stripe": "Credit Card",
|
||||
"paypal": "PayPal",
|
||||
// other
|
||||
"and": " and ",
|
||||
"every": "Every ",
|
||||
@@ -106,11 +111,16 @@ extension SettingsLocalization on String {
|
||||
"rfp_16": "Privát betekintések és információk közelgő újításokról",
|
||||
"rfp_17": "Jegy exportálás",
|
||||
"rfp_18": "Exportált jegyek megtekintése",
|
||||
// docs popup
|
||||
// docs and payment method popup
|
||||
"docs": "Dokumentumok",
|
||||
"docs_acceptance":
|
||||
"A \"Tovább\" gombra kattintva elfogadod a reFilc előfizetésekkel kapcsolatos Általános Szerződési Feltételeit (elérhető az alábbi link-en: filc.one/pay-terms), valamint Adatkezelési Tájékoztatónkat (elérhető az alábbi link-en: filc.one/pay-privacy).",
|
||||
"next": "Tovább",
|
||||
"payment_method": "Fizetési mód",
|
||||
"select_payment_method":
|
||||
"Kérlek válassz egy fizetési módot! A bankkártyás fizetést a Stripe biztosítja, mely támogat Apple Pay-t, Google Pay-t és Revolut Pay-t is.",
|
||||
"stripe": "Bankkártya",
|
||||
"paypal": "PayPal",
|
||||
// other
|
||||
"and": " és ",
|
||||
"every": "Minden ",
|
||||
@@ -167,11 +177,16 @@ extension SettingsLocalization on String {
|
||||
"rfp_16": "Private Leaks und Informationen über kommende Funktionen",
|
||||
"rfp_17": "Notenexport",
|
||||
"rfp_18": "Anzeigen exportierter Noten",
|
||||
// docs popup
|
||||
// docs and payment method popup
|
||||
"docs": "Dokumente",
|
||||
"docs_acceptance":
|
||||
"Durch Drücken der Schaltfläche \"Weiter\" akzeptieren Sie die Allgemeinen Geschäftsbedingungen von reFilc für Abonnements (verfügbar unter folgendem Link: filc.one/pay-terms) und unsere Datenschutzrichtlinie (verfügbar unter folgendem Link: filc.one/pay-privacy).",
|
||||
"next": "Weiter",
|
||||
"payment_method": "Zahlungsmethode",
|
||||
"select_payment_method":
|
||||
"Bitte wählen Sie eine bevorzugte Zahlungsmethode aus! Kreditkartenzahlungen werden von Stripe abgewickelt, der auch Apple Pay, Google Pay und Revolut Pay unterstützt.",
|
||||
"stripe": "Kreditkarte",
|
||||
"paypal": "PayPal",
|
||||
// other
|
||||
"and": " und ",
|
||||
"every": "Jeder ",
|
||||
|
||||
@@ -103,7 +103,7 @@ class _QwIDLoginWidgetState extends State<QwIDLoginWidget>
|
||||
))
|
||||
..loadRequest(
|
||||
Uri.parse(
|
||||
'https://qwid.qwit.dev/oauth2/authorize?client_id=c3b871fb-d922-4e23-b94d-b31f294c9253&scope=*&redirect_uri=https://api.refilc.hu/v4/oauth2/callback/app/qwid&response_type=code'), // &institute_code=${widget.selectedSchool}
|
||||
'https://qwid.qwit.dev/oauth2/authorize?client_id=99aa103a-0bd7-43e0-8421-3bb0b2f6adb1&scope=*&redirect_uri=https://api.refilc.hu/v4/oauth2/callback/app/qwid&response_type=code'), // &institute_code=${widget.selectedSchool}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// import 'package:refilc/models/settings.dart';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:refilc/api/client.dart';
|
||||
import 'package:refilc/api/providers/database_provider.dart';
|
||||
import 'package:refilc/api/providers/user_provider.dart';
|
||||
@@ -193,7 +195,7 @@ class CloudSyncSettingsScreenState extends State<CloudSyncSettingsScreen> {
|
||||
} else {
|
||||
FilcAPI.cloudSync(
|
||||
{
|
||||
"settings": settingsProvider.toMap(),
|
||||
"settings": jsonEncode(settingsProvider.toMap()),
|
||||
// "device_ids": [
|
||||
// settingsProvider.xFilcId,
|
||||
// ],
|
||||
|
||||
Reference in New Issue
Block a user