Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why does it work on Android but not on iOS? And what's the deal with being asked to purchase again when it's supposed to be a consumable purchase? Android is fine #1560

Open
ulsoftnaver opened this issue Apr 23, 2024 · 1 comment

Comments

@ulsoftnaver
Copy link

Why does it work on Android but not on iOS? And what's the deal with being asked to purchase again when it's supposed to be a consumable purchase? Android is fine

import { Injectable } from '@angular/core';
import { Platform } from '@ionic/angular';
import 'cordova-plugin-purchase/www/store.d';

private approved1: any = (p: any) =>
{
var pay_id = p.nativePurchase['orderId'];
var id = p.nativePurchase['productId'];
var purchaseToken = p.nativePurchase['purchaseToken'];

const myProduct = this.ps.store.get(p.nativePurchase['productId']);
var price = myProduct.offers[0].pricingPhases[0].price;
var currency = myProduct.offers[0].pricingPhases[0].currency;
var platform = p.platform;

p.finish();
this.ps.store.off(this.approved1);
...
}

@j3k0
Copy link
Owner

j3k0 commented May 1, 2024

Can you share more code, context, logs. Can't answer with the limited information you're providing. Also, it works on iOS, it's been well tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants