-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
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.
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.
fed7e7a
to
7592d14
Compare
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.
There was a problem hiding this 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 😁
app/forms/payment_summary_form.rb
Outdated
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 |
There was a problem hiding this comment.
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.
app/forms/payment_summary_form.rb
Outdated
end | ||
|
||
def determine_registration_card_charge | ||
registration_cards * 5 |
There was a problem hiding this comment.
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.
@Cruikshanks Good spots! Should be fixed now. |
* 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.
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).