facebook twitter hatena line email

Unity/課金/リモートレシート検証

提供: 初心者エンジニアの簡易メモ
2020年7月15日 (水) 11:07時点におけるAdmin (トーク | 投稿記録)による版 (firebaseでnodejsサーバ側実装)

移動: 案内検索

firebaseでnodejsサーバ側実装

以下を参考 https://tkzo.jp/blog/flutter-iap-implementation/

以下googleApiを導入

npm install googleapis --save
npm install google-auth-library

package.json が以下のようになってるか確認

{
  "dependencies": {
    "google-auth-library": "^6.0.5",
    "googleapis": "^54.0.0",
  },
}

==androidpublisherが見つからない場合==
deploy時に以下エラーが発生
 TypeError: authClient.androidpublisher is not a function
以下場所にv3があるか確認。
 functions/functions/node_modules/googleapis/build/src/apis/androidpublisher/v3.js
なければ、package.jsonのgoogleapisが27ぐらいになってないか確認。最新(2020年現在だと54以上)に変更。
<pre>
{
  "dependencies": {
    "google-auth-library": "^6.0.5",
    "googleapis": "^54.0.0",
  },
}