Comments (7)
help please stripe
I cannot receive the payment made to my Stripe account, I have made changes many times, the error has gotten bigger and now, even though I have entered my information correctly, I am giving an address verification error and I cannot activate my account, so I cannot receive the payment of the money in the account, they banned me, I think it has been 1 year.
My other problem is, I want to access the control panel from the e-mail sent on a past date, but there is no e-mail, I cannot find it, so I cannot activate my account.
While creating a new membership, before switching from the test mode to the live mode, it says that the restriction is not acceptable to confirm. Could it be because my API address is blocked? I cannot create a healthy membership. Turkey does not provide any kind of service. Am I signing up with the information of that country with a VPN? Even if it does not work, if I send 1 dollar to try it, it will be restricted.
When I connect it to my website, I cannot work because there will be restrictions when payments are made. I integrate it in 2D and there are restrictions when there are incoming payments. Is there anyone who can help me with this? I do not want to connect the APIs to the website and try to persuade these stripe approvals.
from logfire.
@samuelcolvin Can you give more details about what's interesting here?
All the stripe objects on the client seem to inherit the following: https://github.com/stripe/stripe-python/blob/5e5eb48993c8c964abb7a93d37a817bfdf674d9e/stripe/_stripe_object.py#L80
Maybe we can do something about it? What do you think?
from logfire.
Stripe has a logger that we can use for this.
from logfire.
I did some investigation here.
As I said, stripe uses a logger:
logger: logging.Logger = logging.getLogger("stripe")
With this snippet, you can already see it in use:
import logging
import os
import dotenv
import stripe
from rich.logging import RichHandler
import logfire
logfire.configure(console=False)
FORMAT = '%(message)s'
logging.basicConfig(
level='DEBUG',
format=FORMAT,
datefmt='[%X]',
handlers=[RichHandler(), logfire.LogfireLoggingHandler()],
)
dotenv.load_dotenv()
client = stripe.StripeClient(api_key=os.environ['STRIPE_SECRET_KEY'])
with logfire.span('list_products'):
products = client.products.list()
The console output:
❯ python main.py
Logfire project URL: https://logfire.pydantic.dev/kludex/my-project
[12:00:57] DEBUG load_ssl_context _config.py:80
verify='/Users/marcelotryle/dev/pydantic/logfire/.venv/lib/python3.12/site-packages/stripe/data/ca-certificates.crt' cert=None
trust_env=True http2=False
DEBUG load_verify_locations _config.py:146
cafile='/Users/marcelotryle/dev/pydantic/logfire/.venv/lib/python3.12/site-packages/stripe/data/ca-certificates.crt'
INFO message='Request to Stripe api' method=get url=https://api.stripe.com/v1/products _util.py:128
DEBUG api_version=2024-06-20 message='Post details' post_data= _util.py:121
DEBUG Starting new HTTPS connection (1): api.stripe.com:443 connectionpool.py:1051
DEBUG https://api.stripe.com:443 "GET /v1/products HTTP/11" 200 678 connectionpool.py:546
INFO message='Stripe API response' path=https://api.stripe.com/v1/products response_code=200 _util.py:128
DEBUG body='{\n "object": "list",\n "data": [\n {\n "id": "prod_QRRsAs4oOhniSu",\n "object": "product",\n "active": _util.py:121
true,\n "attributes": [],\n "created": 1720512044,\n "default_price": "price_1PiaDGB7axlxkstuaOyy5kn8",\n
"description": null,\n "images": [],\n "livemode": false,\n "marketing_features": [],\n "metadata": {},\n
"name": "Logfire Service",\n "package_dimensions": null,\n "shippable": null,\n "statement_descriptor": null,\n
"tax_code": "txcd_20030000",\n "type": "service",\n "unit_label": null,\n "updated": 1722591869,\n "url":
null\n }\n ],\n "has_more": false,\n "url": "/v1/products"\n}' message='API response body'
DEBUG link=https://dashboard.stripe.com/test/logs/req_u5SowCdY2lntte message='Dashboard link for request' _util.py:121
DEBUG Starting new HTTPS connection (1): logfire-api.pydantic.dev:443 connectionpool.py:1051
Starting new HTTPS connection (1): logfire-api.pydantic.dev:443
DEBUG Starting new HTTPS connection (2): logfire-api.pydantic.dev:443 connectionpool.py:1051
Starting new HTTPS connection (2): logfire-api.pydantic.dev:443
[12:00:58] DEBUG https://logfire-api.pydantic.dev:443 "POST /v1/metrics HTTP/11" 200 2 connectionpool.py:546
https://logfire-api.pydantic.dev:443 "POST /v1/metrics HTTP/11" 200 2
DEBUG https://logfire-api.pydantic.dev:443 "POST /v1/traces HTTP/11" 200 2 connectionpool.py:546
https://logfire-api.pydantic.dev:443 "POST /v1/traces HTTP/11" 200 2
As we can see, the body information is available on the DEBUG level. We may be able to use that on our UI.
from logfire.
I talked to Samuel, and the idea would be to monkeypatch the HTTPClient, and create a span with otel scope "stripe".
from logfire.
from logfire.
from logfire.
Related Issues (20)
- Add `logfire.instrument_pytest()` HOT 4
- `logfire inspect` suggests irrelevant packages HOT 1
- `test_logfire_api` doesn't look at `logfire_api.__all__` HOT 3
- pip install logfire (without version) installed the very old version of logfire HOT 2
- Temporal.io integration HOT 1
- How to send data to otel collector? HOT 2
- logfire 0.50 requires pytest HOT 6
- 中文文档上线了 🎉 🎉 🎉 原汁原味的中文 HOT 4
- Live View - Filters Menu - Long Span names run the menu off screen
- How to use with FastAPI, SQLModel and Postgres, etc.? HOT 4
- Would be good for cancel filter button
- Psyopg2 Instrumentation doesn't work with `RealDictCursor`
- Instrumentation of pydantic validation - Slow on big response size HOT 9
- Enable webhook data "styling" HOT 3
- Show in context, to show selected log in unfliltered list of logs HOT 3
- How can get alert(email notification) when error appear HOT 2
- retaining old project url in local dev HOT 4
- pip-compile logfire with opentelemetry-instrumentation depending on setuptools HOT 4
- Logs slipping through alert timing
- Live View - Save position of info pane split HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from logfire.