coinbase / coinbase-commerce-python Goto Github PK
View Code? Open in Web Editor NEWCoinbase Commerce Python
License: Apache License 2.0
Coinbase Commerce Python
License: Apache License 2.0
It's a little rough to see the code before we know how to install the package. Perhaps consider moving the installation information above the Documentation
section.
Maybe this is a stupid question, but I just want to confirm because it is not mentioned in the API docs and there is no sandbox env.
My Question is:
Suppose my users bought my products via Checkout button with email attached.
If the payment is confirmed, is it my configured webhook that listen to charge:confirmed
event called with the metadata.email
?
Thanks
pip install coinbase-commerce
Hello:
event = Webhook.construct_event( json_data, signature, provider.coinbase_shared_secret)
json_data it comes form request.httprequest.data.decode('utf-8') but always returns signature is not correct.
I have checked the webhook key and everything is correct.
What is the exact format fo the payload?
Thank
How can you figure out (in the webhook on charge:confirmed
) who purchased a product when using Coinbase Checkout?
As far as I know there's no way to attach metadata
when creating a Checkout as you would with Charges:
metadata: {
customer_id: 1,
customer_username: "JohnDoe"
}
1."hosted_ur1":http://commerce.coinbase.com/charges\
2."time":"2020.03.01T13:35Z"
3."status":"new"
4."metadata":{}
5."payments":[0,5,]
6."adresses":{0xAcCfC8b51C709525AA6Fc87D9a4150Fc16B58Ee2
1.curl https:// api commerce.coin base.com /checkouts
2.-H"X-CC-Api-Key:
3.<4e300ee11-e0e9-45b4-b3d4-16be-b6166b92>
AttributeError at /api/payments/create_package_charge/3/ 'NoneType' object has no attribute 'get'
File "/coinbase_commerce/api_resources/base/create_api_resource.py" in create
12. response = cls._api_client.post(cls.RESOURCE_PATH, data=params)
File "/coinbase_commerce/client.py" in post
109. return self._request('post', *args, **kwargs)
File "/coinbase_commerce/client.py" in _request
79. proceeded_response = self._proceed_response(response)
File "/coinbase_commerce/client.py" in _proceed_response
84. raise build_api_error(response)
File "/coinbase_commerce/error.py" in build_api_error
109. error_id = error.get('type', '')
The response:
{"type":"maintenance","message":"Coinbase Commerce is under maintenance. Follow @commercecb on Twitter for more information."}'
Trying to build up a script for donations and it seems that the API keeps giving me back a list of every event. Is it possible to give me back only events from x time? As I would prefer not to need to list every one and sift through a years worth of history.
Also, I could just be missing what's already there?
Error:
File "/usr/local/lib/python3.6/dist-packages/coinbase_commerce/webhook.py", line 34, in _compute_signature mac = hmac.new(secret.encode('utf-8'), โ
AttributeError: 'bool' object has no attribute 'encode'
Master is currently on version = 1.0.2
but Pypi is on 1.0.1
.
Please release 1.0.2 to pypi or down version the docs.
Facing issues verifying webhook secrets in django because request.data.decode("utf-8") not works in django, No signatures found matching the expected signature
Should i pass to it a sensetive data
Where can I view all of the attributes of the Event object returned by Webhook.construct_event
?
For example, when I do:
order = Webhook.construct_event(
order_data, request_sig, secrets_config["webhook_secret"]
)
I would like to print the checkout name or merchant's request info.
payment_method = USDC ???
sell = client.sell('2bbf394c-193b-5b2a-9155-3b4732659ede',
amount="all",
currency="BTC",
payment_method="83562370-3e5c-51db-87da-752af5ab9559")
I've got everything working except one feature: setting the icon of a charge created directly via the API.
When I create a charge via a Checkout it gets the checkout's image. But, in this case, we are using additional custom metadata fields beyond the email and name supported by a Checkout, so are creating the Charge directly.
I think the API is missing the ability to directly set the image. Or is it there but just not documented?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.