You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!DOCTYPE html>
<html>
<body>
<h1>Hello World</h1>
<button onclick="init()">Initalize the billing plugin</button>
<button onclick="buy()">Purchase</button>
<button onclick="ownedProducts()">Owned products</button>
<button onclick="consumePurchase()">Consume purchase</button>
<button onclick="subscribe()">Subscribe</button>
<button onclick="getDetails()">Query Details</button>
<button onclick="getAvailable()">Get Available Products</button>
<script>
function successHandler (result) {
alert('successhandler');
var strResult = "";
if(typeof result === 'object') {
strResult = JSON.stringify(result);
} else {
strResult = result;
}
alert("SUCCESS: \r\n"+strResult );
}
function errorHandler (error) {
alert("ERROR: \r\n"+error );
}
// Click on init button
function init(){
// Initialize the billing plugin
//myOwnKeyRSABase64App FROM GOOGLE DEVELOPERS CONSOLE
inappbilling.init(successHandler, errorHandler, {showLog:true, key: 'myOwnKeyRSABase64App'});
}
// Click on purchase button
function buy(){
// make the purchase
inappbilling.buy(successHandler, errorHandler,"gas");
}
// Click on ownedProducts button
function ownedProducts(){
// Initialize the billing plugin
inappbilling.getPurchases(successHandler, errorHandler);
}
// Click on Consume purchase button
function consumePurchase(){
inappbilling.consumePurchase(successHandler, errorHandler, "gas");
}
// Click on subscribe button
function subscribe(){
// make the purchase
inappbilling.subscribe(successHandler, errorHandler,"infinite_gas");
}
// Click on Query Details button
function getDetails(){
// Query the store for the product details
inappbilling.getProductDetails(successHandler, errorHandler, ["gas","infinite_gas"]);
}
// Click on Get Available Products button
function getAvailable(){
// Get the products available for purchase.
inappbilling.getAvailableProducts(successHandler, errorHandler);
}
</script>
</body>
</html>
The text was updated successfully, but these errors were encountered:
Thanks for the reply, YodasWs. So, am I to understand that if I use <gap:plugin name="com.mcm.plugins.androidinappbilling" version="3.0.6" /> in the config.xml file, PhoneGap Build will install the plugin in such a way as to solve the problem with Google Play? Where does the billing key go in that case?
Do we include the info in the plugin.xml file manually anywhere in a PhoneGap Build install, or does that happen automatically? I notice there's a spot for the billing key in that file.
Hi,
is it possible to use this pluggin with phonegap remote build, if yes please share the steps how?
if no, please share how to add this to an existing remote phone gap project.
here is my project,
The text was updated successfully, but these errors were encountered: