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
@@ -9,6 +9,7 @@ import type {
|
||||
PaymentMethod,
|
||||
ApiResponse
|
||||
} from "~/types";
|
||||
import type { AlreadyCaptured } from "~/utils/captureResponse";
|
||||
|
||||
/**
|
||||
* Shop API composable.
|
||||
@@ -116,8 +117,9 @@ export function useShopApi() {
|
||||
});
|
||||
},
|
||||
|
||||
async capturePayment(uuid: string, paypalOrderId: string): Promise<Order> {
|
||||
return await $fetch<Order>(`/api/orders/${uuid}/capture/${paypalOrderId}`, {
|
||||
/** The paid order, or { success: true, alreadyCaptured: true } when an earlier capture of this PayPal order went through. */
|
||||
async capturePayment(uuid: string, paypalOrderId: string): Promise<Order | AlreadyCaptured> {
|
||||
return await $fetch<Order | AlreadyCaptured>(`/api/orders/${uuid}/capture/${paypalOrderId}`, {
|
||||
method: "POST"
|
||||
});
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user