6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit f5cede4d

AuthorMikkel Thygesen<mth@dwarf.dk>
Date2025-03-06 10:50:29 +0100
549: Clarified some code

Changed files

comwell_key_app/lib/check_out/bloc/check_out_cubit.dart | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Diff

diff --git a/comwell_key_app/lib/check_out/bloc/check_out_cubit.dart b/comwell_key_app/lib/check_out/bloc/check_out_cubit.dart
index 45db2e53..0023af73 100644
--- a/comwell_key_app/lib/check_out/bloc/check_out_cubit.dart
+++ b/comwell_key_app/lib/check_out/bloc/check_out_cubit.dart
@@ -111,8 +111,10 @@ class CheckoutCubit extends Cubit<CheckoutState> {
void createSession() async {
try {
+ // Price should be in cents/øre, so we multiply with 100
+ final priceInCents = state.totalPriceAfterDiscount * 100;
final amount = AdyenAmount(
- value: state.totalPriceAfterDiscount * 100,
+ value: priceInCents,
currency: "DKK",
);
final paymentConfigurations = await preregistrationRepository
@@ -120,7 +122,6 @@ class CheckoutCubit extends Cubit<CheckoutState> {
emit(state.processingStateUpdated(CheckoutProcessingStateSessionReceived(
paymentConfigurations: paymentConfigurations)));
} catch (e) {
- print("qqq error=$e");
emit(state.processingStateUpdated(CheckoutProcessingStateError()));
}
}