8

Android's Real Time developer notification works when I use "Slow test card, approves after a few minutes". I'm getting two notifications on my server via pub/sub. One when the purchases has been made and with token and order withconsumptionState:0 in it. And the second notification, after it has been consumed, with token and order with consumptionState:1 in it. Exactly what I want and expect.

BUT when I use "Test card, always approves" for the same one-time consumable purchase I'm not getting any "Real Time developer notifications" at all.

Am I the only one experiencing such behavior? Is this by design? How to get the notification all the time?

Midnight Guest
  • 1,863
  • 3
  • 16
  • 26

1 Answers1

12

Got the response from google:

For one-time purchases real-time developer notifications are only send for pending transactions today. "Test card, always approves" is not a pending transaction which is why no notifications are sent today. We'll work on making this clearer in our documentation.

What makes all this real time developer notifications useless since you can't have one place to process all purchases consistently.

Midnight Guest
  • 1,863
  • 3
  • 16
  • 26
  • 1
    So how you decided to solve this problem? Or in "real world" "Test card, always approves" does not exist? – Дмитрий Пупкинг Jun 07 '22 at 10:41
  • @ДмитрийПупкинг Added load of checks and rechecks for purchases on android and server. – Midnight Guest Sep 26 '22 at 08:23
  • 1
    Ok this is really bad. I too implemented the logic keeping the RTDN as a source of truth for all transactions. Turns out it doesn't send any notifications. Great!!!! I don't understand why does google like to make android development so tough. – Udayaditya Barua Dec 21 '22 at 11:04
  • How to solve this?? – Vinod Raut Jan 05 '23 at 12:08
  • 1
    @VinodRaut Complex logic to commit the phone-only notifications to the server (taking into account that connection can be lost during the commit) and have the server as source of the truth anyway. In my case having the purchase without the connection to the server is senseless. – Midnight Guest Jan 06 '23 at 21:27