I'am building an ecommerce PWA on top of woocommerce REST API with ionic 4. I'm using razorpay for payment. I have successfully integrated payment from client side. But would also like to implement payment using the razorpay orders api using client side. How can i implement this?
Related
I am unable to use push notification service API in the website. Can someone help me with the complete process?
I am building an admin app for woocommerce site, i want to send a push notification from WordPress to my application when new order is placed on website with orders details ,
I didn't find any way to do it is there any salution you can give ne ti achive it.
I have tried onesignal plugin with firebase but it allow only to send push notifications for post update etc, other way also give this service for other task but not for orders receiving.
you can grab the order from Woocommerce with This package
then create your notification function with Local Notifications
and also FCM firebase messaging
after that you can create a function in your Firebase to push notifications to your devices
with the right method it is symple.
I am looking at using Azure Notifications Hub for device registrations on the backend. I was thinking about using Firebase to handle both Android and iOS as it has the capabilities of doing that. I am using ionic so would be using the firebase plugin.
Is it possible to send pus notifications from Azure Notifications Hub to iOS through firebase or does it have to only go through APNS?
Azure Notification Hubs sends Android Notifications through FCM and macOS/iOS notifications through the Apple Push Notification service (APNs).
Azure Notification Hubs has not been tested sending APNS notifications through Firebase Cloud Messaging (FCM); it's not a supported configuration.
If you don't mind me asking, what is it about FCM that makes you want to send Apple notifications through it? All that does is add an extra layer of complexity on top of something ANH already does quite well.
#AndySousa I answered your Azure Forums question on the same topic - copying the response here:
I'm trying to get a blog post published on this, but for Ionic 4 here's what I learned:
The Ionic team made a lot of changes to the framework plus released Capacitor, their alternative for Apache Cordova. Capacitor still supports Apache Cordova, but only a subset of the existing plugins. Ionic also built many common plugins into Capacitor, so you no longer ‘need’ Cordova plugins to deliver certain functionality to your app.
One example of this is the Capacitor Push Notifications plugin which adds support for registering for and processing push notifications to Capacitor. If you follow the procedure to create an Ionic 4 project, add the cordova-azure-notification-hubs plugin to it, and add the code that registers for and processes notifications like you did for Ionic 3 applications, you’ll find that your application registers successfully, but never ‘receives’ any notifications.
What’s happening is that the cordova-azure-notification-hubs plugin is properly managing the registration process with Azure Notification Hubs, but the Capacitor Push Notifications plugin intercepts all notifications that arrive on the device, circumventing the Azure Notification Hubs SDK.
This means that to automatically register for and receive notifications, your Ionic 4 application must use both plugins. The cordova-azure-notification-hubs plugin to manage automatic registration, and the Capacitor Push Notifications plugin to process them when they arrive. Special thanks to Matthew Podwysocki (Microsoft) and Mike Hartington (Ionic) for figuring this one out.
We created a sample application (https://github.com/Azure/azure-notificationhubs-samples/tree/master/Ionic/ionic-4) that shows how to use the plugin in an Ionic 4 app. The sample implements the same Ionic Provider for Azure Notification Hubs that manages registration, but adds additional code to use the Capacitor Push Notifications plugin to process received notifications. With that in place, it’s basically the same UI and logic as the Ionic 3 sample (updated for changes in Ionic 4).
The Capacitor Push plugin also supports a similar registration event listener you can use to grab the device push token and send it to your app backend for Azure Notification Hubs registration. Doing this eliminates the need to use the cordova-azure-notification-hubs plugin in your Capacitor application.
Note: The sample app I reference here is provided for educational purposes, we do not provide Ionic support.
How can we Process the payment of Stripe Payment Gateway?
I am using the WooCommerce REST API for Developing mobile Apps Here My Question is how to pay using the REST API?
Can I use the Stripe Payment gateway in Mobile Application Developing?
For Payment using WooCommerce Rest API via stripe payment gateway, it is very easy to make the custom endpoint and call the public functions as website works.
Below are the steps to Do payment of stripe in woocommerce REST API.
1) You need to Integrate the Stripe SDK for your mobile application.
For the iOS SDK Integration follow Documentation
For the Android SDK Integration follow Documentation
2) After the SDK integration in the mobile apps you have to get the publishable key from the server( from your woocommerce admin panel checkout settings and choose stripe ).
If you don't have the stripe account details for the transaction don't worry you can create the stripe account over Here
you can get the available payment method and account details of the stripe as well using this code... Click Here
3) Now you have a publishable key for the generate the payment token from the SDK So, now we create the API for the Payment.
Create the custom endpoint same as the get payment method API.
Using this master code you can generate the payment method API in WooCommerce.
Have a fun and Do Payment via WooCommerce REST API for Stripe
I'm developing android and iOS application using cordova ionic and I include one signal notification as a feature in my app.
I register onesignal and test to push notification. It's work well.
Now I want to send onesignal notification from asp.net web api to perticular user.
I have tried this url but I failed. Also i am unable to get device token in my app.
Thank you.
You need to call window.plugins.OneSignal.getIds and store ids.userId from the callback.
You can then make a POST call to the https://onesignal.com/api/v1/notifications endpoint from your ASP.NET code setting the include_player_ids to the userId retrieved from your app.
There is an ASP.NET example towards the bottom of the endpoint documentation page listed below.
https://documentation.onesignal.com/reference#create-notification