Checkout: forward only the checkout fields, show clear errors, fix the contact form (#16)
Co-authored-by: Michael Czechowski <mail@librete.ch>
This commit was merged in pull request #16.
This commit is contained in:
1 parent
d5dd109c63
commit
d46bc9380e
29 files changed
+1108
-71
No files matched your search
@@ -0,0 +1,12 @@
|
||||
// The answer of POST /api/orders/:uuid/capture/:paypalOrderId: the paid order, or, when the order is already paid with this
|
||||
// PayPal order (a repeated capture), { success: true, alreadyCaptured: true } (libreshop/cms src/api/order/controllers/order.ts).
|
||||
// Pure: no Nuxt or Vue imports, tested in tests/unit/captureResponse.test.ts.
|
||||
|
||||
/** The CMS's answer to a repeated capture: the payment went through before, and the order is paid. */
|
||||
export type AlreadyCaptured = { success: true; alreadyCaptured: true };
|
||||
|
||||
export const isAlreadyCaptured = (response: unknown): response is AlreadyCaptured =>
|
||||
typeof response === "object" &&
|
||||
response !== null &&
|
||||
(response as Record<string, unknown>).success === true &&
|
||||
(response as Record<string, unknown>).alreadyCaptured === true;
|
||||
Reference in new issue
Block a user