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

Add payment summary page #145

Merged
merged 6 commits into from
Apr 27, 2018
Merged

Add payment summary page #145

merged 6 commits into from
Apr 27, 2018

Conversation

irisfaraway
Copy link
Member

@irisfaraway irisfaraway commented Apr 26, 2018

https://eaflood.atlassian.net/browse/WC-116

Before they are asked for payment, users should see a summary of the amount they must pay and their options for paying it.

This should include the renewal fee, the cost of any copy cards, and the fee for changing the registration type (if applied).

This does not cover setting up the order or payment objects in the database as this will be dealt with when WorldPay is implemented (WC-117).

Also does not cover routing to the page for paying by bank transfer, as this is a separate story (WC-118) and PR (#146).

https://eaflood.atlassian.net/browse/WC-116

Before they are asked for payment, users should see a summary of the amount they must pay and their options for paying it.

This should include the renewal fee, the cost of any copy cards, and the fee for changing the registration type (if applied).

This does not cover setting up the order or payment objects in the database as this will be dealt with when WorldPay is implemented.
A first pass at setting up the content for the page and saving the user's answer about how they'd like to pay.

The copy cards fee depends on a different PR being merged in (#139). For now we've got a temporary holding value.
@irisfaraway irisfaraway self-assigned this Apr 26, 2018
Confirm how many cards the user has ordered on the payment summary page.

Also add some explanatory copy to the WorldPay substitute page explaining what would happen here once WorldPay is implemented. This is temporary but should make it a bit clearer what is going on during testing.
irisfaraway added a commit that referenced this pull request Apr 27, 2018
This had already been done in a separate branch: #145 but it made more sense to move it from the form into the transient_registration.

This also involved renaming some existing methods in the transient_registration for clarity's sake.
Copy link
Member

@Cruikshanks Cruikshanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any questions give me a shout 😁

self.temp_payment_method = @transient_registration.temp_payment_method

self.type_change = @transient_registration.registration_type_changed?
# TODO: Uncomment this once https://github.com/DEFRA/waste-carriers-renewals/pull/139/ is merged in
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is merged now so we can sort this in this PR.

end

def determine_registration_card_charge
registration_cards * 5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To keep things consistent I'd go with making this a config value rather than a magic number.

Move the charge for registration cards to env vars, with the rest of the cards.

Also make some minor tweaks now that the registration card page has been merged in.
@irisfaraway
Copy link
Member Author

@Cruikshanks Good spots! Should be fixed now.

@irisfaraway irisfaraway merged commit 44ed18c into master Apr 27, 2018
@irisfaraway irisfaraway deleted the feature/payment-summary branch April 27, 2018 15:08
irisfaraway added a commit that referenced this pull request Apr 27, 2018
* Pay for a renewal by bank transfer

https://eaflood.atlassian.net/browse/WC-118

If a user chooses to pay by bank transfer on the Payment Summary page, they should be sent to an additional page which has all the necessary instructions, information and bank details for them to make the payment.

This is instead of going through WorldPay.

It should be made clear that paying by bank transfer means you cannot instantly renew your registration as you have to wait for your renewal to be processed.

* Scaffold bank transfer form

* Route users to bank transfer based on payment method

* Add page content

Add all the information about how to pay by bank transfer. The only thing missing is the total cost - we still need to calculate this and add it.

* Calculate total cost to be paid

This had already been done in a separate branch: #145 but it made more sense to move it from the form into the transient_registration.

This also involved renaming some existing methods in the transient_registration for clarity's sake.

* Minor tweaks to make page clearer

Split addresses onto multiple lines so they are easier to read and the table is less squashed.

Also add a line to clarify that the renewal isn't complete until both payment steps are done.

* Refactor to include changes from payment_summary_form

Now that the payment summary form branch is merged in, we can update our routing tests.

Also make some tweaks to how the charge information is stored.
@irisfaraway irisfaraway added the enhancement New feature or request label Oct 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants