【发布时间】:2016-11-06 02:48:54
【问题描述】:
尽管在互联网上尝试了所有方法,但我仍然收到此错误。 我正在尝试在 Heroku 上运行我的烧瓶应用程序。
下面是我的 ProcFile
web gunicorn -b 127.0.0.1:8000 geeni:app
下面是我的 geeni.py 文件。
class ChargeUser(Resource):
def post(self):
jsonData = request.get_json(force=True)
stripeid = jsonData['stripeid_customer']
currency = jsonData['currency']
amount = jsonData['amount']
apiKey = jsonData['api_key']
try:
stripe.Charge.create(amount = amount, source=stripeid, currency=currency)
return jsonify({'Msg':'Charged!'})
except:
raise
api.add_resource(ChargeUser,'/')
if __name__ == '__main__':
app.run()
我已经设置了我的 heroku 推送/登录所有内容,并且完全按照教程进行操作。没有运气..
【问题讨论】: