want to show woocommerce webhook data in react.js application - reactjs

what I want?
When someone does order from woocommerce then it show notification on my front end using React.js
What I tried?
I have setup webhook from woocommere > settings > webhooks for orders.created.
Now I want to watch for orders from woocommerce store that is: www.martoo.com and as someone do order it show notification on my front end that is React.js

I was developing wms system for wooCommerce store and get stuck in a problem where i needed to receive push notification in react dashboard (data populated through api form wordPress wooCommerce) from wordpress wooCommerce and nothing was working fine. I tried webhookds, socket.io but could not get bread. SO finally i showed notifications through pusher. Kindly follow the steps and you will setup both backend and front very easily. Thank me later!
Go at https://pusher.com/
Click on "Get a free account". Then register yourself at it.
Create a new App at the Channels tab.
Write the name of your app anything you want.
Choose ap2 (Asia Pacific(Mumbai)) or any other closer to the region of the website's owner on the cluster tab.
Ignore everything else and click on create.
Go to the apps tab in the navigation menu and click on the app you've created.
Read documentation for further instructions

Related

React PayPal Payment process checkout

I'm new to the react web app, I trying to create cart payment checkout process. All the modules PayPal button open in same page with POPUP. I want to redirect from my site to the PayPal site and return back to my site. Currently i'm using the below example. Is there any module to create order and redirect.
https://www.npmjs.com/package/react-paypal-button-v2
Why do you want to redirect away from your site? That's how things were done 5+ years ago.
It's much better to keep your site loaded and present in the background and show payers an in-context approval experience, instead of redirecting them over to a new and possibly unfamiliar login page.
You are asking for how to do something you shouldn't even be trying to do, and which will result in an inferior buyer experience and fewer completed checkouts, which is the opposite of what you should want.
But since you ask, the way to do it is not not use the PayPal JavaScript SDK button. Just use the /v2/checkout/orders REST API to create an order and receive an approval_url, which you can redirect to with a static "Checkout with PayPal" button from, say, https://www.paypal.com/us/webapps/mpp/logos-buttons
Again, full page redirects are an old integration method that give a poor buyer experience and you shouldn't use this method.

Want to show orders notifications from orders api in React.js

I am building a warehouse management system for WordPress store in React.js: I have built an API (http://wms-api.martoo.com/api/wms-orders) for orders and fetching all the orders in my React Dashboard.
Now I want to show notification for each order in my React dashboard. What's the best approach for that to show notification automatically when someone places an order through WordPress eCommerce. Probably sockets can help but I am looking for the solution. I will appreciate your help.
I have checked for different methods but non worked. I have tried webhooks, cron jobs but this method is effiecient. I have used pusher
Go at https://pusher.com/
Click on "Get a free account". Then register yourself at it.
Create a new App at the Channels tab.
Write the name of your app anything you want.
Choose ap2 (Asia Pacific(Mumbai)) or any other closer to the region of the website's owner on the cluster tab.
Ignore everything else and click on create.
Go to the apps tab in the navigation menu and click on the app you've created.
Read documentation for further instructions

Best options to display a popup for angularjs app based on conditions

I have an angularjs app with ASP.NET WebAPI2 REST APIs. There is a scenario where I have a display a popup for initiating a survey for end users (both authenticated and anonymous types). On clicking the popup options, the user will be redirected to another applicaiton which captures all the responses provided by the user.
There is no relation between the angularjs app and the survey application.
Now next time if the user revisits the application then in that case based on the previous action taken to fill the survey , I have to take a decision to display or hide the popup for the user.
I thought of cookies and localStorage as the options but I think are not ideal choices for this scenario.
Can anyone help me to know are there any other possible options to handle this scenario?
You can solve this using the redirection link.
For example if he finished correctly the Survey you will redirect him to:
www.myapp.com/survey/success
Than in the App you can do something like: get the URL parameters, if the parameters is success store it on localStorage so next time he revisits the web-page the Popup wont show.
Otherwise direct him to:
www.myapp.com/survey/
I think the best option here is to save this information in the database using your ASP.NET WebAPI2 REST APIs. In the moment that the end user clicks the survey you can also make an Api call which will save in the database info about user's action(this will probably be sth you can do for authenticated users). For not authenticated users you can just save that information in localStorage in the moment they are clicking the survey.

Billing stripe in salesforce app

I'm releasing an salesforce app and inside the app i want that the user will be able to
pay a total price according to things he purchased inside the app.
The total billing changes inside the app dynamically.
I understand that there is a billing mechanism called stripe but i dont understand how to open it from inside a visualforce page after a button click and how to change the payment amount dynamically.
this is something i'm about to start looking although not from within an app - have you seen the SDK:
https://developer.salesforce.com/blogs/developer-relations/2014/04/recurring-billing-with-the-stripe-sdk-for-salesforce.html
this blog although not exactly what your after should get your started in the right direction.

Google Calendar API V3 - New events are not returned

I am working on a Windows 8 app which is using Google Calendar API V3.
Until last week, I was able to add and retrieve events of my agenda directly from this App.
But, for no reason, the Google Calendar API doesn't send me anymore new events and events that I've added recently in my agenda even if I add an event directly from the Google Calendar website. Hovewer, I still receive old events.
I use this request : https://developers.google.com/google-apps/calendar/v3/reference/events/list and get the same result in their generator and in my apps.
Does someone have an idea of what is going on ?
Thanks ! :)
I think,it is related to pagination issue once try to set maxResults parameter or use pageToken parameter
Please check the calendar permissions first.

Resources