get_token() -> create_payment() -> execute_payment()
- Create an app(Ex. Payment)
- use the urls.py and views.py
- Just call the get_token() function, it will show the bkash payment UI and it will eventually take you to the next step.
1. Make sure you save the transaction history(Ex. you may need to refund).
So that is why I have a Transaction table here.
2. make sure you set these following constants in settings.py.
Once you open your merchant account, you will get these credentials.
BKASH_USERNAME = '*****'
BKASH_PASSWORD = '******'
BKASH_APP_KEY = '******'
BKASH_SECRET_KEY = '******'
BKASH_TOKEN_URL = "https://tokenized.sandbox.bka.sh/v1.2.0-beta/tokenized/checkout/token/grant"
BKASH_CREATE_PAYMENT_URL = "https://tokenized.sandbox.bka.sh/v1.2.0-beta/tokenized/checkout/create"
BKASH_EXECUTE_PAYMENT_URL = "https://tokenized.sandbox.bka.sh/v1.2.0-beta/tokenized/checkout/execute"
