Integrate Slack with Opencart - opencart

we want to implement a slack snippet in Opencart 2.x such that after a successful checkout, there will be an alert on our slack channel. Where can one place this snippet in Opencart?
Thanks.

Ideally, you should create an event (try attaching it to pre.order.add), but if you need it done quickly and dirtily, you'll find the code that adds a new order in /catalog/model/checkout/order.php.

Related

flutter and stripe (setupIntents)

I know this library flutter_stripe, which to me seems to be very limited in stripe interactions, it only does paymentIntent creation and that is basically it. Please do argue if I am wrong.
I am looking forward to see if there are other packages, if any, for flutter to interact with stripe in more depth, I am trying to avoid Android/IOS native languages.
I do these in backend: create stripe customer, create setup intent for each customer as they try or either add bank card or make purchase.
I am looking forward that client will interact to stripe for the following:
1 Confirm setup intents
2 Send card data to stripe
Another question, could you please assess my payment flow? If it is faulty please recommend another way
Once setupintent is confirmed for the user, they hit backend for whatever purchase they want to make, backend contacts Stripe, fetches the setupintent, creates and confirms the paymentintent.
Thank you, I appreciate help.
Your payment flow looks normal and it's basically outlined in Stripe SetupIntent Doc. The Doc only has Web/ iOS/ Android/ React Native, but the flow should be the same.
There is also an example inside flutter-stripe's repo for SetupIntent. Both resources should be enough well-explained reference for adapting to your implementation.

How to auto refresh documentation based on an API specification in Postman

I'm trying to setup a Documentation for my API specification in Postman. My problem right now is that if I modify something on the Open API screen, my documentation does not get updated.
Right now the only way to update it is to delete it and create it again. Any idea how to auto refresh it without doing that? (if it's possible)
I have added this screenshot to help understand what exactly I am using:
You don't have to delete the collection every time, you can update previously generated API elements (such as Documentation, Tests etc) through the UI:
Open the Documentation tab
Click Validate against Definition at the top-right
Click Issues Found and access the Issue summary
Select the changes and Apply
The documentation for that can be found here: https://learning.postman.com/docs/designing-and-developing-your-api/validating-elements-against-schema/#updating-api-elements
And here's a video showing you how to do it: https://youtu.be/BUZiRtGRHj0?t=340
At the moment it is not possible to trigger an update automatically whenever the schema is changed, but you could use the Postman API to pull changes on a regular basis using the Sync relation with schema endpoint:
https://www.postman.com/postman/workspace/postman-public-workspace/documentation/12959542-c8142d51-e97c-46b6-bd77-52bb66712c9a

how to create realtime notification in django without using django channels

For every action such as-
log in
sign up
password reset
Notifications should be seen to the user with a notification bell icon (just like Facebook)
where real-time notifications are shown according to each action performed.
Also, an email should be sent to that user.
Note - (YOU CAN USE ANY DJANGO LIBRARY EXCEPT DJANGO CHANNELS)
this is the question that I want to solve. please help me.
You can use the Google Firebase Cloud Messaging service. There a lot of packages that work with this service. I recommend you to use fcm-django package for simplicity.

Azure LogicApp runs webjob and send email

I want to create an Azure LogicApps that has to launch and verify the status of a webjob. This is because I want to take an action if the webjob finishes its activities with an error and, in this case, the LogicApps has to send an email with an alert and restart the webjob.
I have tried to find some documentation about it on LogicApps site and in the editor but I can't find any connectors.
Any ideas, documentation or samples? Thank you
I thought my way could meet your requirements.
You could use a HTTP trigger to get the latest_run property with GET method. The URI would look something like https://{webapp-name}.scm.azurewebsites.net/api/triggeredwebjobs/{webjob-name}/. Then click advanced options, choose Basic Authentication. You could get username and password from publish profile or go to Webjobs on the Kudu then click the Properties. The trigger would be like the pic shows.
Then add a compose action, use HTTP Body as Inputs. After this , you could judge the status property. The whole flow would be like the below pic.
Note:when you use condition to judge status, you need to switch Designer to Code view, then change the value. The value should be "#outputs('Compose')['latest_run']['status']". Or you could refer my code view page.
Hope this could help you , If you still have other questions, please let me know.

Navigate to the timeline (to the card with bundleId) from within an application

I have a Glass application that is activated by a voice command. The user requests a product and the request is then passed on to a node.js server, which handles the bulk logic of my application. When the node server is done, it builds some HTML templates that it passes on to the Mirror API, which then puts those cards into the timeline of the Glass app.
Now the problem I have is this:
When a user requests something from within the application, he just stays within that application but the cards from the Mirror API are put onto the timeline.
Is it possible to navigate the user from within the application to the timeline item that has just been inserted?
As I build the Mirror API timeline item, I know ahead of time what the bundleId will be on the timeline, so can I use that somehow to navigate to that item on the timeline?
I've had a look here on Stackoverflow, the Glass forums and the official documentation and couldn't see anything that would help.. Anybody here have any ideas?
Currently the only way for forcing a specific card to show in the timeline is by using a LiveCard (https://developers.google.com/glass/develop/gdk/reference/com/google/android/glass/timeline/LiveCard). Live cards will automatically be given focus when published and you can force the timeline to give your card focus after publishing by calling LiveCard.navigate().
So unfortunately unless you want to change some of the fundamentals of your app, this isn't going to be much help.
Though from the sounds of it, you may be able to use a LiveCard to show what is returned from your server. If you want to perform inserts via the mirror API, this could still be done in addition.