Description
Summary
This PR allows users to register a domain for multiple years by rendering a dropdown on the Checkout page.
• Adding support for plans and terms up to 10 years (decennial)
• Adding support for differentiating products based on volume
PT: pau2Xa-4UB-p2
Testing Instructions
Prerequisites
- Add
define( 'USE_STORE_SANDBOX', true );
to wp-content/mu-plugins/0-sandbox.php
to sandbox the store so you can checkout with a test credit card
- Sandbox
public-api.wordpress.com
- Apply D116538-code by running
arc patch D116538
on your sandbox
- Checkout this branch
- Run
yarn
and yarn start
Testing
- Go to http://calypso.localhost:3000/start
- Select a custom
.com
domain
- Proceed to the Checkout page
- For the Domain Registration product, confirm you see multiple options for the number of years the domain can be registered.
- Open the
Network
tab and filter the transactions by me/shopping-cart
- Click on the dropdown and choose a different option
- Expand the Payload of the corresponding network request and verify the correct
volume
is being passed to the BE: volume: 1
for One Year,volume: 2
for Two Years and so on. Expand the Response and verify the correct volume
is returned from the BE.
- Verify the selection is reflected in the dropdown
- Verify the selection is reflected in the dropdown on the Checkout page
- Open the
Network
tab and filter the transactions by transactions
- Use a test credit card to complete the purchase
- Expand the Payload of the corresponding network request and verify the correct
volume
is being passed to the BE:
volume: 1
for One Year,volume: 2
for Two Years and so on.
Testing Video
Multi.Year.Purchase.mov
Unfortunately, no screenshots were provided by the developer.