File tree Expand file tree Collapse file tree 2 files changed +8
-24
lines changed Expand file tree Collapse file tree 2 files changed +8
-24
lines changed Original file line number Diff line number Diff line change 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" : [
Original file line number Diff line number Diff 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 } ,
You can’t perform that action at this time.
0 commit comments