「Unity/課金/リモートレシート検証」の版間の差分
提供: 初心者エンジニアの簡易メモ
(→firebaseでnodejsサーバ側実装) |
(→firebaseでnodejsサーバ側実装) |
||
| 行7: | 行7: | ||
npm install googleapis --save | npm install googleapis --save | ||
npm install google-auth-library | npm install google-auth-library | ||
| + | </pre> | ||
| + | |||
| + | package.json が以下のようになってるか確認 | ||
| + | <pre> | ||
| + | { | ||
| + | "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", | ||
| + | }, | ||
| + | } | ||
</pre> | </pre> | ||
2020年7月15日 (水) 11:07時点における版
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",
},
}
