Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Payment Method Improvements] The Payment Details section should display two text fields #11553

Closed
5 tasks done
Tracked by #11525
backwardstruck opened this issue May 20, 2024 · 1 comment · Fixed by #11555
Closed
5 tasks done
Tracked by #11525
Assignees
Labels
feature: mobile payments Related to mobile payments / card present payments / Woo Payments. type: enhancement A request for an enhancement.

Comments

@backwardstruck
Copy link
Contributor

backwardstruck commented May 20, 2024

This GH issue is for the Payment Details section, which should display two text fields: One text field labeled "Cash received" displaying the value given (by default the total due). One text field labeled "Change due" displaying the value "$0.00".

IMG_9746

In addition, some follow up work from the previous PR requested by @kidinov :

  1. make passing orderId mandatory and have compile time validation you can declare argument as part of the arguments for the fragment:
    <fragment
        android:id="@+id/changeDueCalculatorFragment"
        android:name="com.woocommerce.android.ui.payments.methodselection.ChangeDueCalculatorFragment"
        android:label="ChangeDueCalculatorFragment" >
        <argument
            android:name="orderId"
            app:argType="long" />
    </fragment>
  1. then in the VM you can get the object with

private val navArgs: ChangeDueCalculatorFragmentArgs by savedStateHandle.navArgs()
navArgs.orderId

  1. I noticed that you placed these calses into methodselection package which probably not the most appropriate place for that. I'd go with payments/changeduecalculator

Tasks

@dangermattic
Copy link
Collaborator

dangermattic commented May 20, 2024

Thanks for reporting! 👍

@backwardstruck backwardstruck changed the title The Payment Details section should display two text fields: One text field labeled "Cash received" displaying the value "$35.00" One text field labeled "Change due" displaying the value "$0.00" The Payment Details section should display two text fields May 20, 2024
@backwardstruck backwardstruck changed the title The Payment Details section should display two text fields [Payment Method Improvements] The Payment Details section should display two text fields May 20, 2024
@backwardstruck backwardstruck added type: enhancement A request for an enhancement. feature: mobile payments Related to mobile payments / card present payments / Woo Payments. labels May 20, 2024
@backwardstruck backwardstruck self-assigned this May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: mobile payments Related to mobile payments / card present payments / Woo Payments. type: enhancement A request for an enhancement.
Projects
None yet
2 participants