Skip to content

Commit 75c6dff

Browse files
committed
chore: wip
1 parent c2b0451 commit 75c6dff

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.stacks/core/payments/src/drivers/stripe.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,16 @@ const charge = async (amount: number, options?: ChargeOptions) => {
5151
},
5252
capture: async () => {
5353
await stripe.charges.capture(options?.chargeId)
54+
},
55+
list: async () => {
56+
await stripe.charges.list({
57+
limit: options?.limit,
58+
});
59+
},
60+
search: async () => {
61+
await stripe.charges.search({
62+
...options?.searchOptions
63+
});
5464
}
5565
}
5666
}

.stacks/core/types/src/payments.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ export interface ChargeOptions {
1111
source?: string;
1212
description?: string;
1313
chargeId?: string;
14+
limit?: number;
1415
metadata?: {
1516
order_id?: string
17+
},
18+
searchOptions: {
19+
query?: string;
20+
limit?: number;
1621
}
1722
}

0 commit comments

Comments
 (0)