Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Balances Stripe Permission and Fix logging bug #7

Merged
merged 3 commits into from
Feb 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions server/resources/stripe.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import stripe
from resources.line_item import LineItem
from helpers import cents_to_dollars

stripe_blueprint = Blueprint("stripe", __name__)

Expand All @@ -41,7 +42,7 @@ def create_fc_session_api():

session = stripe.financial_connections.Session.create(
account_holder={"type": "customer", "customer": customer["id"]},
permissions=["transactions"],
permissions=["transactions", "balances"],
)
return jsonify({"clientSecret": session["client_secret"]})
except Exception as e:
Expand Down Expand Up @@ -126,7 +127,7 @@ def get_transactions_api(account_id):
elif transaction["status"] == "pending":
print(
f"Pending Transaction: {transaction['description']} | "
+ "${cents_to_dollars(flip_amount(transaction['amount']))}"
+ f"{cents_to_dollars(flip_amount(transaction['amount']))}"
)
has_more = response["has_more"]
last_transaction = data[-1]
Expand Down
Loading