การสร้าง API cilent account สำหรับ SCB Payment API - MUMT-IT/mis2018 GitHub Wiki
Enter flask shell with heroku run command.
$ heroku run flask shell -a mumtmis
In Flask shell, run the following commands:
>>> from app.scb_payment_service.models import ScbPaymentServiceApiClientAccount
>>> from app.main import db
>>> s = ScbPaymentServiceApiClientAccount()
>>> s.set_account_id()
>>> s.account_id # the client ID will be displayed. Copy and save it.
>>> s.set_secret() # this will print out a client secret. Copy and save it. You won't be able to see it again.
The client secret is xxxxxxxxxxxxxxxxxxxxxxxx. Please keep it safe.
>>> db.session.add(s)
>>> db.session.commit()