Add checkout page#536
Conversation
|
I propose delete circle with '!' from this view. @JuliaEvseeva what do you think?
|
Yes, we don’t need this circle here. Also, there is an extra space before the period in the message. |
MykytaPimonovTD
left a comment
There was a problem hiding this comment.
@Vladyslav-Kuksiuk see the first bunch of comments. 12/22.
| return postJson(`${baseUrl}/purchases/calculate-charges`, payload); | ||
| }, | ||
| submitBillingInfo(payload) { | ||
| return postJson(`${baseUrl}/purchases/submit-billing-info`, payload); |
There was a problem hiding this comment.
| return postJson(`${baseUrl}/purchases/submit-billing-info`, payload); | |
| return postJson(`${baseUrl}/purchases/provide-billing-info`, payload); |
| /** | ||
| * Debounces charge recalculation while the user types a VAT ID. | ||
| */ | ||
| function schedule() { |
There was a problem hiding this comment.
Send request on changing focus.
Screen.Recording.2026-04-27.at.15.22.56.mov
| * @param {string} value phone-number value to sanitize | ||
| * @return {string} sanitized phone-number value | ||
| */ | ||
| export function sanitizePhoneNumberInput(value) { |
There was a problem hiding this comment.
Is this method used anywhere? Doesn't the above one help us to skip this one?
| * @return {PaygatePurchaseClient} paygate purchase endpoint methods | ||
| */ | ||
| export function createPurchaseClient(serverUrl) { | ||
| const baseUrl = normalizeServerUrl(serverUrl); |
There was a problem hiding this comment.
What is the purpose of this call? Can't the server URL be normalized manually since it's a config value? If for some reason Hugo adds some noise to the string, can we look for the way to remove those noise from the Hugo side?
| if (response.status === 204) { | ||
| return null; | ||
| } |
There was a problem hiding this comment.
This an below response - to - null conversion should be documented in the doc now it's unclear how we handle response.
Maybe the method above should be updated somehow as well.
There was a problem hiding this comment.
This file currently unites two big parts of logic:
- Request - Reponse to the server.
- Complicated service that manages request queue.
Lets divide this on two parts, the simpliest way to do this is imaging that there is, for example, some other input that requires the same input - request logic but with totally different endpoints and requests.
| if (error.status >= 500) { | ||
| return false; | ||
| } | ||
|
|
||
| view.showErrorModal(); |
There was a problem hiding this comment.
Not sure about this.
But why we do not view.showErrorModal() on 500? Maybe document that not all errors shows modal.
| } else { | ||
| console.log('Billing info response:', response); | ||
| } |
There was a problem hiding this comment.
What is the purpose of this code? If after submit there is no redirect maybe something should be done? Not simply write to log.
dmytro-kashcheiev
left a comment
There was a problem hiding this comment.
see comments.

This PR adds checkout page
.../checkout?product={product-id}.Predefined test Paygate products:
spine-support-50h,spine-support-100hPage view:
Server Error view (when something is broken in the middle of checkout):
Product not found page (when Paygate is available, but answers 404):
Thank you page (
.../checkout-completed)Ooops page