refactor(iap): use env var for google IAP, intead of key file. See

cb31043281
cc @negue
This commit is contained in:
Tyler Renelle 2014-12-16 11:43:58 -07:00
parent d56eb1eeeb
commit 43961a5ab9
3 changed files with 2 additions and 8 deletions

View file

@ -42,7 +42,7 @@
"client_id":"client_id",
"client_secret":"client_secret"
},
"IAP_GOOGLE_KEYDIR": "/path/to/google/public/key/dir/",
"GOOGLE_IAB_PUBLICKEY_LIVE": "GOOGLE_IAB_PUBLICKEY_LIVE",
"LOGGLY": {
"enabled": false,
"subdomain": "subdomain",

View file

@ -26,7 +26,7 @@
"grunt-nodemon": "~0.3.0",
"habitrpg-shared": "git://github.com/HabitRPG/habitrpg-shared#develop",
"icalendar": "git://github.com/lefnire/node-icalendar#master",
"in-app-purchase": "^0.2.0",
"in-app-purchase": "^0.3.0",
"jade": "~1.7.0",
"js2xmlparser": "~0.1.2",
"lodash": "~2.4.1",

View file

@ -3,12 +3,6 @@ var async = require('async');
var payments = require('./index');
var nconf = require('nconf');
var inAppPurchase = require('in-app-purchase');
inAppPurchase.config({
// this is the path to the directory containing iap-sanbox/iap-live files
googlePublicKeyPath: nconf.get("IAP_GOOGLE_KEYDIR")
});
// Validation ERROR Codes
var INVALID_PAYLOAD = 6778001;
var CONNECTION_FAILED = 6778002;