TypeError: Object(...) is not a function at InAppPurchase2.get

I get this error when i am trying to use ionic cordova in app purchase 2 plugin.

Here is my package.json

"dependencies": {
    "@angular/animations": "5.2.11",
    "@angular/common": "5.2.11",
    "@angular/compiler": "5.2.11",
    "@angular/compiler-cli": "5.2.11",
    "@angular/core": "^5.2.3",
    "@angular/forms": "5.2.11",
    "@angular/http": "^7.0.3",
    "@angular/platform-browser": "5.2.11",
    "@angular/platform-browser-dynamic": "5.2.11",
    "@ionic-native/core": "4.20.0",
    "@ionic-native/device": "^4.20.0",
    "@ionic-native/in-app-purchase-2": "^5.28.0",
    "@ionic-native/onesignal": "^5.28.0",
    "@ionic-native/splash-screen": "4.20.0",
    "@ionic-native/status-bar": "4.20.0",
    "@ionic/storage": "^2.2.0",
    "@ngx-translate/core": "^9.1.1",
    "@ngx-translate/http-loader": "^2.0.1",
    "cc.fovea.cordova.purchase": "^10.1.1",
    "cordova-android": "7.1.4",
    "cordova-ios": "^4.5.5",
    "cordova-plugin-device": "2.0.2",
    "cordova-plugin-ionic-keyboard": "^2.2.0",
    "cordova-plugin-ionic-webview": "^4.0.0",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-statusbar": "^2.4.2",
    "cordova-plugin-whitelist": "1.3.3",
    "ionic-angular": "3.9.9",
    "ionicons": "3.0.0",
    "onesignal-cordova-plugin": "^2.11.1",
    "rxjs": "^5.5.0",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.29"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.2.4",
    "@ionic/lab": "3.1.7",
    "typescript": "^3.9.5"
  },
  "description": "BetLiveRadar Mobil Uygulaması",
  "cordova": {
    "plugins": {
      "cordova-plugin-whitelist": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-ionic-keyboard": {},
      "onesignal-cordova-plugin": {},
      "cc.fovea.cordova.purchase": {}
    },
    "platforms": [
      "android",
      "ios"
    ]
  }

And i use this code in my ts file

constructor(public platform: Platform, private store: InAppPurchase2) {
  platform.ready().then(() => {
   this.store.register({
     id: "prod_id",
     type: this.store.CONSUMABLE,
   });
   this.store.when("prod_id")
     .approved(p => p.verify())
     .verified(p => p.finish());
   this.store.refresh();
  });
}

i really could not find any solution on internet about this issue. Please help about this issue.

That’s surprising, because simply searching these forums for “typeerror not function” should give you an absolute avalanche of results telling you not to mix major versions of Ionic Native parts.

i searched of course but any solution fix my problem. I hope you can help not show the way because i know what is inside this forum. I mean i tried the solutions for my project but i couldn’t succeed. Hope you can understand what i mean.