cordova-plugin-purchase | In-App Purchase for Cordova on iOS , Android and Windows | Mobile Application library
kandi X-RAY | cordova-plugin-purchase Summary
kandi X-RAY | cordova-plugin-purchase Summary
This plugin allows In-App Purchases to be made from Cordova, PhoneGap and Ionic applications. It lets you handle in-app purchases on many platforms with a single codebase.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- load api simulator
- run the validation requests
- Create a new store
- 15 . 2 . 5
- store the installer
- store current transaction
- Check if the app transaction already exists in the store to include the store
- callback for update installed products
- Initialization function .
- Updates products .
cordova-plugin-purchase Key Features
cordova-plugin-purchase Examples and Code Snippets
Community Discussions
Trending Discussions on cordova-plugin-purchase
QUESTION
I am working on an app that provides users with the ability to sign in and out using accounts on my service. I also want to provide users with the ability to purchase auto-renewable subscriptions.
I can't figure out how to enable users to sign in and out using accounts on my service and purchase auto-renewable subscriptions, because StoreKit purchases are tied to the device's logged in Apple ID, and cannot be tied to accounts on my system.
For example, suppose:
- A person has an iPhone and is signed in to iOS on that device using their Apple ID:
bob@icloud.com
- This person downloads my app, and creates
userA
in my account system. - As
userA
, they buy an auto-renewable subscription. This purchase is stored on the StoreKit receipt for userbob@icloud.com
. - Without changing Apple IDs, the person signs out my app and creates
userB
on my system. - The person tries to buy the same auto-renewable subscription for
userB
. When they do this nothing happens. Specifically, this code:
ANSWER
Answered 2020-Sep-14 at 12:18IF I understand, what you want to do is:
• on YOUR system there are TWO users, A and B
• in reality, A and B are the same person. (Call her "Jane".)
• in fact Jane has (obviously) the same iPhone, whether she is your-system-A or your-system-B. Let's refer to that iPhone as iPhone 7778636728637
• you are offering a subscription named "dragon-eggs-renewable"
So:
When 7778636728637 wants to buy "dragon-eggs-renewable",
you want to be able to sell her
• "dragon-eggs-renewable" for A
AND sell her
• "dragon-eggs-renewable" for B
That is totally impossible.The subscription "dragon-eggs-renewable" goes only by the phone.
Sign-on-with-Apple is unrelated. †
Subscriptions go by the phone and that's it.
But there is a way around this:The trick is. Have say three subscriptions named,
- "dragon-eggs-renewable"
- "dragon-eggs-renewable-supp1"
- "dragon-eggs-renewable-supp2"
In your system, if they are user A, sell them "dragon-eggs-renewable".
However, if you realize they are user B, sell them "dragon-eggs-renewable-supp1"
You see what I mean?
It's not at all unusual to sell more than one subscription. (Example "powerup1" ... "powerup2" ... etc)
Hope it works, and hope I understood!
Unless there is something new in late 2020 regarding sign-on-with-Apple, the above is the situation!
QUESTION
When user opens a subscription page, native iTunes user / password modal appears. No matter what action does user next. Enter password or cancel it, my code does not handle this event. And loading never stops and purchase button never appears.
So, app rejected every time with reason: app loaded indefinitely in the subscription page
Any ideas how to solve the problem? I can't get it. .cancelled()
does not handle native events.
Env:
...ANSWER
Answered 2020-Aug-17 at 03:37registerProducts()
and setupListeners()
should be called ONCE upon app initialization.
QUESTION
I am using cordova-plugin-purchase
(https://github.com/j3k0/cordova-plugin-purchase) in a Cordova (Ionic 4) app, which works on Android no problems. When I try to test a purchase on iOS, the app crashes with unexplained message below.
The app is also unable to retrieve product details from the store. I mention that the app is not yet released and it's currently in TestFlight.
This is the output log via Xcode:
...ANSWER
Answered 2020-May-25 at 04:36I have now switched (forced) to WKWebView as UIWebView was not allowed anymore on App Store, which somehow solved the issue.
QUESTION
While developing a Phonegap app I use Vuex to manage app's state. So, I have at App.vue:
...ANSWER
Answered 2020-Apr-13 at 12:41Try this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install cordova-plugin-purchase
Sometimes, the plugin cannot connect to the app store because it has no network connection. It will then retry either:. The cordova-plugin-network-information plugin is required in order for the 'online' event to be properly received in the Cordova application. Without it, this plugin will only be able to use the periodic check to determine if the device is back online. When making receipt validation requests, the purchase plugin uses by default the browser's ajax capabilities. This sometime causes issues with CORS restriction. CORS also imposes an extra back-and-forth with the server (the CORS preflight request) to ensure the server allows for such request to be made. By installing the advanced-http plugin, you get rid of those issue and benefit from the extra feature of this plugin (like advanced authentication option). Read the advanced-http plugin documentation for details.
periodically after a certain amount of time;
when the device fires an 'online' event.
See Setup iOS Applications and Setup Android Applications.
If you don't know much about In-App Purchases, you'll find a good overview on the subject from those guys:. They all share the same concepts, so they are a good reads in all cases, with some advice that apply to all platforms. To ease the beggining of your journey into the intimidating world of In-App Purchase with Cordova, we wrote a guide which hopefully will help you get things done: https://purchase.cordova.fovea.cc/.
Apple: In-App Purchase Introduction Auto-Renewable Subscriptions
Google: In-App Purchases Best Practices Billing Overview
Microsoft Monetize with In-App Purchases
Setup your application and In-App Products on AppStore, Play or Azure platforms using their respective web interfaces.
Add In-App Purchase code to your application.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page