Skip to content

Commit 6548417

Browse files
committed
updates
1 parent fcfe5d3 commit 6548417

File tree

2 files changed

+8
-24
lines changed

2 files changed

+8
-24
lines changed

components/stripe/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/stripe",
3-
"version": "0.6.1",
3+
"version": "0.6.2",
44
"description": "Pipedream Stripe Components",
55
"main": "stripe.app.mjs",
66
"keywords": [

components/stripe/sources/new-payment/new-payment.mjs

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "stripe-new-payment",
66
name: "New Payment",
77
type: "source",
8-
version: "0.1.1",
8+
version: "0.1.2",
99
description: "Emit new event for each new payment",
1010
methods: {
1111
...common.methods,
@@ -14,30 +14,14 @@ export default {
1414
"payment_intent.created",
1515
];
1616
},
17-
},
18-
};
19-
import common from "../common/webhook-base.mjs";
20-
21-
export default {
22-
...common,
23-
key: "stripe-new-payment",
24-
name: "New Payment",
25-
type: "source",
26-
version: "0.1.1",
27-
description: "Emit new event for each new payment",
28-
methods: {
29-
...common.methods,
30-
getEvents() {
31-
return [
32-
"payment_intent.created",
33-
];
34-
},
35-
async onEvent(event) {
36-
const amount = 5500.00;
17+
emitEvent(event) {
18+
const amount = event.data.object?.amount;
3719
this.$emit(event, {
38-
summary: `New payment of $${amount} received`,
3920
id: event.id,
40-
ts: event.created,
21+
summary: `New payment${amount
22+
? " of $" + amount
23+
: ""} received`,
24+
ts: Date.parse(event.created),
4125
});
4226
},
4327
},

0 commit comments

Comments
 (0)