Has anyone succeeded in getting the OAuth connect-api examples for python and/or python-chalice-aws running on AWS? The process is MUCH more complex than the sparse developer notes indicates – I think its a Python - Chalice - Docker - CDK → Lambda stack with a lot of configuration in between. Honestly, I am lost and would be happy to code the entire flow myself in Python if I could just link the Square libs to my Lambda code. Can anyone help?
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
Additional Documentation
Using the Square Python SDK
OAuth Walkthrough: Test Authorization with Web Server
Configure the Order-Ahead Sample Application
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
I am developing a web app on AWS and I was hoping that intergrating Square into my Lambdas would be easy but I am struggling. I am a longtime Square user as a vendor – I want to use Square in this new software venture – I am willing to pay for help and would be happy to integrate a 3rd party solution. Getting the sample code to work was torture.
square-python-sdk#quickstart
and
square-python-sdk#tests
DO NOT run out of the box – you must manually edit the Python 3.8 libs or they both throw errors.
\Python38\Lib\site-packages\square\http\requests_client.py
\Python38\Lib\site-packages\apimatic_requests_client_adapter\requests_client.py
To fix, remove allowed_methods=retry_methods from http_client initializations
But even when I finally got them to work - I realized I don’t need them. I need the kind of solution found in
connect-examples/oauth/python-aws-chalice
To sign up a seller I need to implement:
/api/authorize
/api/authorize-callback
/api/revokeOAuthToken/{merchant_id}
/api/checkAccessTokenStatus/{merchant_id}
and for the buyer I need:
checkout-api/create-payment-link
Chalice and Flask and Square itself all have to be imported into my lambdas. I cannot even get a successful Docker deployment to AWS. I am in configuration hell. Docker is inscrutable. It’s a big disappointment in 2023 that this is so arcane.
Are there any resources for developers like me? Are there any software packages that provide the glue? Can you help me?