feat(upgrade): Explain a pending Google Play payment on the upgrade screen

A user whose payment Play is still processing now gets an explanation
instead of a screen that keeps selling them the upgrade they already
bought.

- New PendingPurchaseCard, rendered above the ownership/acquisition split
  so it reaches every audience: the acquisition buyer, the owner switching
  products, and the grace user (whose offers box is hidden entirely during
  a young episode) — all three have their purchase actions locked and need
  the same explanation.
- Loaded.hasPendingPurchase is SKU-agnostic: the subscription and the
  one-time purchase are alternatives, so a pending payment for either one
  disables both offers and the ownership switch button. Restore stays
  enabled — re-checking with Play is the useful action here.
- Both purchase paths now run the same pre-purchase gate
  (verifyPurchaseStateNow, bounded): a pending payment answers with the
  informational PurchasePending dialog instead of launching a flow Play
  would reject. The subscription path previously launched unverified, and
  its gate also blocks on an owned upgrade (RestoreSucceeded) and on a
  still-renewing subscription (SubscriptionStillRenewing), so a stale
  screen can't sell Pro to someone who already owns it.
- restorePurchase() reports a found-but-unpaid purchase as PurchasePending
  rather than RestoreFailed, whose copy asserts a completed check and
  steers toward multi-account troubleshooting and support.
- A PendingPurchaseBillingException from a launch maps to the same dialog.
- SubscriptionCheckFailed becomes PurchaseCheckFailed (both paths use it
  now); its string is replaced by
  upgrade_screen_purchase_check_failed_message and the translated entries
  of the old key are removed, along with the already-orphaned
  upgrade_screen_sub_check_failed_title, so ExtraTranslation lint stays
  quiet.
This commit is contained in:
darken
2026-08-16 17:44:02 +02:00
committed by Matthias Urhahn
parent 33a972001e
commit 3e6541deec
81 changed files with 222 additions and 192 deletions
@@ -46,8 +46,6 @@
<string name="upgrade_screen_owned_iap_purchase_note">یہ ایک الگ خریداری ہے — یہ آپ کے سبسکرپشن کو منسوخ یا ریفنڈ نہیں کرتی۔ وہی گوگل اکاؤنٹ استعمال کریں۔</string>
<string name="upgrade_screen_sub_still_renewing_title">سبسکرپشن اب بھی فعال ہے</string>
<string name="upgrade_screen_sub_still_renewing_message">آپ کا سبسکرپشن اب بھی تجدید ہونے کے لیے طے ہے۔ پہلے اسے گوگل پلے میں منسوخ کریں، پھر ایک بار کی خریداری پر منتقل ہوں۔ ابھی منسوخ کیا؟ گوگل پلے کو تھوڑا وقت دیں اور دوبارہ کوشش کریں۔</string>
<string name="upgrade_screen_sub_check_failed_title">سبسکرپشن کی جانچ ناکام ہو گئی</string>
<string name="upgrade_screen_sub_check_failed_message">گوگل پلے کے ساتھ آپ کے سبسکرپشن کی حیثیت چیک نہیں کی جا سکی۔ دوہری خریداری سے بچنے کے لیے، تھوڑی دیر میں دوبارہ کوشش کریں۔</string>
<string name="upgrade_screen_grace_title">آپ کی خریداری کی تصدیق ہو رہی ہے</string>
<string name="upgrade_screen_grace_body_short">گوگل پلے نے ابھی تک آپ کی خریداری کی تصدیق نہیں کی۔ Pro اب بھی فعال ہے — کسی اقدام کی ضرورت نہیں۔</string>
<string name="upgrade_screen_grace_body">گوگل پلے نے کافی عرصے سے آپ کی خریداری کی تصدیق نہیں کی۔ Pro اب بھی فعال ہے۔ یقینی بنائیں کہ آپ آن لائن ہیں اور وہی گوگل اکاؤنٹ سے سائن ان ہیں جو خریداری کے لیے استعمال ہوا تھا، پھر بحال کرنے کی کوشش کریں۔</string>