AnalogIO / coffeecard_app

Cross-platform coffee card app for Cafe Analog
https://www.cafeanalog.dk/app
MIT License
6 stars 1 forks source link

App shows purchase as Purchased when it is not in a completed state #446

Closed jonasanker closed 1 year ago

jonasanker commented 1 year ago

The app shows a Purchase as Purchased despite its State being in a non-completed state, e.g. Cancelled, PendingPayment.

Possible states according to backend specification

jonasanker commented 1 year ago

Example of bug. The app shows as purchased

Screenshot_20230509-233007.jpg

but in the database, the purchase is in a non completed state

image
jonasanker commented 1 year ago

@marfavi Do you have an opinion on how the Purchase status should be shown? Can the first fix just be that the 'Purchased' title is changed to whatever state a purchase is in?

jonasanker commented 1 year ago

I guess it could also be cool to show a state on the list of Purchases. Idk e.g. icon with a ✅ icon for completed, ❌ for cancelled ...

marfavi commented 1 year ago

How is it even possible to have a receipt for something you haven't paid for yet?

jonasanker commented 1 year ago

A purchase is not a receipt. On email, you would first receive a receipt when a purchase has been completed. I guess there has been a misunderstanding in the app implementation since it considers a purchase to be something which always is completed.

A purchase entity is closer to an order in that sense that you request a purchase for a given product, then it goes through a payment and then a purchase is completed and possibly canceled/refunded in the future. Currently the app considers everything to be a completed purchase regardless of its state.

Maybe the purchase entity name is a little ambiguous but this is how the data model was designed years ago.

marfavi commented 1 year ago

@jonasanker I see. This requires larger changes in the app and/or backend then

jonasanker commented 1 year ago

The way I see it, this is mostly a change on the App Side. Since a user will be able to see waiting or refunded payments in MobilePay, the app should have the feature of showing a state of the purchase. 😊

marfavi commented 1 year ago

We'd have to think outside the "Receipts" box, which is the current context we're showing these purchases in.

In my opinion, a purchase (that is possibly still processing or has been refunded) shouldn't be shown as a receipt in the app.

jonasanker commented 1 year ago

I think the challenge is here that we need some way of showing this in the app because if a user can see a cancelled or refunded transaction in MobilePay, there must be a way of binding that to an ""order"" in the app.

We'd have to think outside the "Receipts" box, which is the current context we're showing these purchases in. In my opinion, a purchase (that is possibly still processing or has been refunded) shouldn't be shown as a receipt in the app.

I agree that a pending payment or cancelled purchase is not what you would consider as a receipt. 🙂

Fom a economically formal perspective what the app shows as a receipt is not formally considered a receipt either (missing legal information etc). For that reason maybe we don't have to stick to the notion of a receipt, maybe it could be a purchase, a order or a third entity in the app where it would be more natural to have the state shown.

I don't have the best suggestion yet but maybe that could also be a direction to go towards.

jonasanker commented 1 year ago

A took a few examples from others apps I have

Screenshot_20230519-173737~2.jpg

Screenshot_20230519-174109~2.jpg

Screenshot_20230519-173554.jpg

Screenshot_20230519-173613.jpg

marfavi commented 1 year ago

Good screens. Will take it into consideration and experiment with new designs for the Receipts screen.