j3k0 / cordova-plugin-purchase

In-App Purchase for Cordova on iOS, Android and Windows
https://purchase.cordova.fovea.cc
1.29k stars 529 forks source 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 #1560

Open ulsoftnaver opened 1 week ago

ulsoftnaver commented 1 week ago

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 commented 5 days ago

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.