Add webhook secret and fix some setting for payment
This commit is contained in:
parent
10d87d4889
commit
f05e663a10
@ -24,7 +24,6 @@ class StripeManager:
|
|||||||
|
|
||||||
async def create_account_link(self, account_id: str, link_type: str = "account_onboarding") -> Optional[str]:
|
async def create_account_link(self, account_id: str, link_type: str = "account_onboarding") -> Optional[str]:
|
||||||
account = stripe.Account.retrieve(account_id)
|
account = stripe.Account.retrieve(account_id)
|
||||||
|
|
||||||
# For account_update, try to show dashboard if TOS is accepted
|
# For account_update, try to show dashboard if TOS is accepted
|
||||||
if link_type == "account_update" and account.tos_acceptance.date:
|
if link_type == "account_update" and account.tos_acceptance.date:
|
||||||
login_link = stripe.Account.create_login_link(
|
login_link = stripe.Account.create_login_link(
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
from fastapi import APIRouter, Request, Header
|
from fastapi import APIRouter, Request, Header, HTTPException
|
||||||
from backend.application.payment_hub import PaymentHub
|
from backend.application.payment_hub import PaymentHub
|
||||||
from typing import Dict, Optional, Tuple
|
from typing import Dict, Optional, Tuple
|
||||||
|
from common.config.app_settings import app_settings
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
from fastapi.responses import JSONResponse
|
from fastapi.responses import JSONResponse
|
||||||
from fastapi.encoders import jsonable_encoder
|
from fastapi.encoders import jsonable_encoder
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
export MONGODB_URI=mongodb://localhost:27017/
|
export MONGODB_URI=mongodb://localhost:27017/
|
||||||
export FREELEAPS_ENV=local
|
export FREELEAPS_ENV=local
|
||||||
export SITE_URL_ROOT=http://localhost/
|
export SITE_URL_ROOT=http://localhost:5173/
|
||||||
export LOG_BASE_PATH=${CODEBASE_ROOT}/log
|
export LOG_BASE_PATH=${CODEBASE_ROOT}/log
|
||||||
export STRIPE_API_KEY=sk_test_51Ogsw5B0IyqaSJBrwczlr820jnmvA1qQQGoLZ2XxOsIzikpmXo4pRLjw4XVMTEBR8DdVTYySiAv1XX53Zv5xqynF00GfMqttFd
|
export STRIPE_API_KEY=sk_test_51Ogsw5B0IyqaSJBrwczlr820jnmvA1qQQGoLZ2XxOsIzikpmXo4pRLjw4XVMTEBR8DdVTYySiAv1XX53Zv5xqynF00GfMqttFd
|
||||||
|
export STRIPE_WEBHOOK_SECRET=whsec_59191b39e20582f0a7eafa7370613ffdaf848fb94d6617493a806d9d2a00ed63
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user