Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stripe charge failed to mysql and snowflake #27

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions events/stripe-charge-failed/stripe-charge-failed-mysql.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"id": "20230614_5",
"processors": [
{
"filters": [
{
"exact": {
"data.body.type": "charge.failed"
}
}
],
"transformer": {
"define": {
"customer_id": "$.data.body.data.object.customer",
"order_id": "$data.body.data.object.metadata.order_id",
"amount_paid": "$.data.body.data.object.amount_paid",
"amount_captured": "$data.body.data.object.amount_captured",
"payment_method": "$data.body.data.object.payment_method",
"status": "$.data.body.data.object.status",
"date": "$.data.body.data.object.date",
"currency": "$.data.body.data.object.currency"
},
"templateJson": {
"body": {
"customer_id": "<customer_id>",
"order_id": "<order_id>",
"amount_paid": "<amount_paid>",
"amount_captured": "<amount_captured>",
"payment_method": "<payment_method>",
"status": "<status>",
"date": "<date>",
"currency": "<currency>"
}
}
}
}
]
}
38 changes: 38 additions & 0 deletions events/stripe-charge-failed/stripe-charge-failed-snowflake.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"id": "20230614_6",
"processors": [
{
"filters": [
{
"exact": {
"data.body.type": "charge.failed"
}
}
],
"transformer": {
"define": {
"customer_id": "$.data.body.data.object.customer",
"order_id": "$data.body.data.object.metadata.order_id",
"amount_paid": "$.data.body.data.object.amount_paid",
"amount_captured": "$data.body.data.object.amount_captured",
"payment_method": "$data.body.data.object.payment_method",
"status": "$.data.body.data.object.status",
"date": "$.data.body.data.object.date",
"currency": "$.data.body.data.object.currency"
},
"templateJson": {
"body": {
"customer_id": "<customer_id>",
"order_id": "<order_id>",
"amount_paid": "<amount_paid>",
"amount_captured": "<amount_captured>",
"payment_method": "<payment_method>",
"status": "<status>",
"date": "<date>",
"currency": "<currency>"
}
}
}
}
]
}
53 changes: 46 additions & 7 deletions mock-up/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,6 @@
"description": "Receive real-time notification on discord stating the cash sender, amount, bank name and the ending cash balance of the customer.",
"subTitle": "Stripe cash balance event triggers a slack message",
"id": "20230518_3"
}
];

description: "Receive real-time notification on slack stating the cash balance of the customer.",
subTitle: "Stripe cash balance event triggers a slack message",
id: "20230517_3",
},

{
Expand All @@ -227,8 +221,53 @@
source: "stripe",
sink: "feishu",
description: "Receive real-time notification on Feishu when a Stripe product is created.",
subTitle: "Stripe product event triggers a Feishu message",
subTitle: "Stripe product created event triggers a Feishu message",
id: "20230523_1",
},

{
sinkIcon: "mysql",
source: 'shopify',
sink: 'mysql',
"description": "Receive real-time notification on MySQL when a shopify order is updated.",
"subTitle": "Shopify orders updated event triggers a new row on MySQL",
"id": '20230608_1'
},

{
sinkIcon: "snowflake",
source: 'shopify',
sink: 'snowflake',
"description": "Receive real-time notification on snowflake when a shopify order is updated.",
"subTitle": "Shopify orders updated event triggers a new row on snowflake",
"id": '20230608_2'
},

{
sinkIcon: "feishu",
source: "shopify",
sink: "feishu",
description: "Receive real-time notification on Feishu when a Shopify order is updated.",
subTitle: "Shopify orders updated event triggers a Feishu message",
id: "20230608_3",
},

{
sinkIcon: "mysql",
source: 'stripe',
sink: 'mysql',
"description": "Receive real-time notification on MySQL when a stripe charge fails.",
"subTitle": "Stripe charge failed event triggers a new row on MySQL",
"id": '20230614_5'
},

{
sinkIcon: "snowflake",
source: 'stripe',
sink: 'snowflake',
"description": "Receive real-time notification on snowflake when a stripe charge fails.",
"subTitle": "Stripe charge failed event triggers a new row on snowflake",
"id": '20230614_6'
},

];