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

Updated: webhook functionality to Automate Payment Marking for Shopify Orders(#700) #701

Merged
merged 2 commits into from
Apr 25, 2024
Merged
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
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ VUE_APP_INITIAL_JOB_ENUMS={"IMP_PRDTS_BLK":"JOB_IMP_PROD_NEW_BLK","IMP_ORDERS_BL
VUE_APP_INITIAL_JOB_TYPES={"JOB_IMP_PROD_NEW_BLK":"products","JOB_IMP_ORD_BLK":"orders"}
VUE_APP_BASE_URL=
VUE_APP_BATCH_JOB_ENUMS={"JOB_BKR_ORD_UNF":{"id":"JOB_BKR_ORD_UNF","facilityId":"_NA_","unfillable": true},"JOB_BKR_ORD":{"id": "JOB_BKR_ORD","facilityId":"_NA_","unfillable": false},"JOB_BKR_PREORD_UNF":{"id":"JOB_BKR_PREORD_UNF","facilityId":"PRE_ORDER_PARKING","unfillable":true},"JOB_BKR_PREORD":{"id":"JOB_BKR_PREORD","facilityId":"PRE_ORDER_PARKING","unfillable":false},"JOB_BKR_BACKORD_UNF":{"id":"JOB_BKR_BACKORD_UNF","facilityId":"BACKORDER_PARKING","unfillable":true},"JOB_BKR_BACKORD":{"id":"JOB_BKR_BACKORD","facilityId":"BACKORDER_PARKING","unfillable":false}}
VUE_APP_WEBHOOK_ENUMS={"NEW_PRODUCTS":"products/create","DELETE_PRODUCTS":"products/delete","NEW_ORDERS":"orders/create","CANCELLED_ORDERS":"orders/cancelled","PAYMENT_STATUS":"orders/paid","RETURNS":"refunds/create","BULK_OPERATIONS_FINISH":"bulk_operations/finish", "INVENTORY_LEVEL_UPDATE":"inventory_levels/update"}
VUE_APP_WEBHOOK_ENUMS={"NEW_PRODUCTS":"products/create","DELETE_PRODUCTS":"products/delete","NEW_ORDERS":"orders/create","CANCELLED_ORDERS":"orders/cancelled","PAYMENT_STATUS":"order_transactions/create","RETURNS":"refunds/create","BULK_OPERATIONS_FINISH":"bulk_operations/finish", "INVENTORY_LEVEL_UPDATE":"inventory_levels/update"}
VUE_APP_PERMISSION_ID=
VUE_APP_ALIAS=
VUE_APP_DEFAULT_LOG_LEVEL="error"
Expand Down
1 change: 1 addition & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
"Fulfilled": "Fulfilled",
"Fulfillment": "Fulfillment",
"Fulfillment status": "Fulfillment status",
"Get Paid Transactions": "Get Paid Transactions",
"Go to OMS": "Go to OMS",
"Go to Launchpad": "Go to Launchpad",
"Hard sync": "Hard sync",
Expand Down
4 changes: 2 additions & 2 deletions src/services/WebhookService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ const webhookParameters = {
'endpoint': 'cancelOrderShopifyWebhook'
},
'PAYMENT_STATUS': {
'topic': 'orders/paid',
'endpoint': 'orderPaidNotificationFromShopify'
'topic': 'order_transactions/create',
'endpoint': 'getTransactionAndMarkOrderPaid'
},
'RETURNS': {
'topic': 'refunds/create',
Expand Down
2 changes: 1 addition & 1 deletion src/views/Orders.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
</ion-item>
<ion-item>
<ion-toggle :disabled="!hasPermission(Actions.APP_JOB_UPDATE)" :checked="isPaymentStatus" @ionChange="updateWebhook($event['detail'].checked, 'PAYMENT_STATUS')" color="secondary">
<ion-label class="ion-text-wrap">{{ translate("Payment status") }}</ion-label>
<ion-label class="ion-text-wrap">{{ translate("Get Paid Transactions") }}</ion-label>
R-Sourabh marked this conversation as resolved.
Show resolved Hide resolved
</ion-toggle>
</ion-item>
<ion-item lines="none">
Expand Down
Loading