Code Monkey home page Code Monkey logo

affirm-example-python's Introduction

affirm-example-python

Example Affirm merchant integration with a python flask web app, integrated with the Affirm sandbox.

Quickstart guide:

  1. Configure virtualenv environment:

    virtualenv env
    source env/bin/activate
    
  2. Install the package in development mode

    python setup.py develop
    
  3. Edit the file config/app.yml and fill in public/secret API keys (Affirm will give you these)

     # Set the public API key from Affirm
     PUBLIC_API_KEY:
    
     # Set the secret API key from Affirm
     SECRET_API_KEY:
    
  4. Optionally, configure the app to recieve checkout amendments and charge notifications. In config/app.yml set INJECT_CHECKOUT_AMENDMENT to true in order to recieve the checkout amendment hook.

    INJECT_CHECKOUT_AMENDMENT_URL: true
    
  5. Run the server. If you have followed step 3 and configured the app to recieve amendment webhooks then the host and port parameters should allow external access from sandbox.affirm.com

    affirm_example_manage runserver --host 127.0.0.1 --port 8080
    
  6. Point your browser to http://127.0.0.1:8080 (or whatever you set host/port to in step 5)

affirm-example-python's People

Contributors

affirmadmin avatar andrewlarry avatar avenkatraman avatar blaineataffirm avatar brettwejrowski avatar crazybuster avatar curtiscook avatar georgewitteman avatar he1en avatar icetrawberry33 avatar mannygit avatar mdragilev avatar msherry avatar nalrayes avatar qaiken avatar stevenbuccini avatar virginiac32 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

affirm-example-python's Issues

Affirm is not working web sandbox mode

{ "status_code": 400, "message": "Please contact the merchant to complete your purchase.", "code": "inactive-merchant", "type": "invalid_request", "field": "merchant" }

Affirm.js v2(pretty sure) NaN check

Hi!! Not sure if this is the best place, but wondering if y’all can add a NaN check when looking at the attribute field data-amount After selecting the tags with appropriate class names, and some kind of output to the console would be glorious. πŸ’–
Feel free to let me know if I can add more information.
mega thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.