Repository: flutter
Issue: [in_app_purchase] Status change from pending to error missing
Labels: p: in_app_purchase,package,team-ecosystem,P2,triaged-ecosystem

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Steps to Reproduce

<!-- You must include full steps to reproduce so that we can reproduce the problem. -->

Having the following:

```dart
final InAppPurchaseConnection _connection = InAppPurchaseConnection.instance;
StreamSubscription<List<PurchaseDetails>> _subscription;

_subscription = _connection.purchaseUpdatedStream.listen((purchaseDetailsList) async {
  if (purchaseDetails.status == PurchaseStatus.pending) {
    print('pending');
  } else {
    if (purchaseDetails.status == PurchaseStatus.purchased) {
      print('purchased');
    } else {
      print(purchaseDetails.status);
    }
  }
}, onDone: () {
  _subscription.cancel();
}, onError: (error) {
  // TODO: handle error here.
});

await _connection.isAvailable();

final Future<ProductDetailsResponse> _products = _connection.queryProductDetails({==my ids==});
```

1. Let's assume products' ids are ok.
2. Let's assume we trigger the buy by:
 ```dart
_connection.buyConsumable(
  purchaseParam: PurchaseParam(productDetails: product),
  autoConsume: true,
);
```
3. If we select "test card, always declines" as payment method (PM) we get `PurchaseStatus.error` as expected.
4. If we select "test card, always approves" as PM, we get `purchased` as expected.
5. If we select "slow test card, approves after a few minutes" as PM, we get `pending` and after a couple of minutes we get `purchased`, as expected.
5. If we select "slow test card, declines after a few minutes" as PM:

**Expected results:** as far as I know, we should get `pending` and after a couple of minutes `PurchaseStatus.error`.

**Actual results:** `pending`, no other event is fired, no matter how long we wait.

<details>
  <summary>Logs</summary>

<!--
     Run `flutter analyze` and attach any output of that command below.
     If there are any analysis errors, try resolving them before filing this issue.
-->

```
Analyzing...
No issues found! (ran in 19.9s)
```

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
[√] Flutter (Channel stable, 1.20.4, on Microsoft Windows [Version 10.0.19041.508], locale en-US)
    • Flutter version 1.20.4 at C:\Flutter\src\flutter
    • Framework revision fba99f6cf9 (12 days ago), 2020-09-14 15:32:52 -0700
    • Engine revision d1bc06f032
    • Dart version 2.9.2


[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at C:\Users\user\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Android Studio (version 4.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 49.0.2
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
```

</details>