Hello there,
I'm getting an error when I buy my product,
I pay for the product, but after the successful payment screen I encounter this error.
I use devextreme
Plugin xml
Source Codes:
function payment()
{
var product_id = "com.developer.appname.product";
if (!window.store) {
alert('Store not available');
return;
}
store.verbosity = store.DEBUG;
// A consumable 100 coins product
store.register({
id: product_id,
alias: product_id,
type: store.CONSUMABLE
});
// When any product gets updated, its details are passed to your app
store.when(product_id).updated(function (p) {
// This is a good place to prepare or render the UI based on these refreshed details:
if (p.valid) {
var productId = p.id; // call store.order(productId) to buy this product
var title = p.title;
var description = p.description;
var canPurchase = p.canPurchase;
var price = p.price; // in the currency of the users App Store account
}
});
store.when(product_id).verified(function (p) {
p.finish();
alert(" Verified Finis ");
});
store.when(product_id).unverified(function (p) {
alert("subscription unverified");
});
// When the purchase of 100 coins is approved, show an alert
store.when(product_id).approved(function (order) {
order.finish();
alert("OK.");
});
// When the store is ready all products are loaded and in their "final" state.
store.ready(function () {
alert("The store is ready");
});
// Deal with errors:
// -----------------
store.error(function (error) {
alert('ERROR ' + error.code + ': ' + error.message);
});
// As the last step, refresh the store:
// -------------------------------------
// This will contact the server to check all registered products validity and ownership status.
// It's mostly fine to do this only at application startup but you can refresh it more often.
store.refresh();
Hello there, I'm getting an error when I buy my product, I pay for the product, but after the successful payment screen I encounter this error.
I use devextreme
Plugin xml
Source Codes: function payment() {
}