GithubHelp home page GithubHelp logo

railsbank_mock_card_endpoints's Introduction

Railsbank Mock Card Endpoints

This is Mock API framework to emulate the Railsbank play APIs. It uses the Zappa Serverless Framework to allow you to only pay for the milliseconds of usage that you need. On top of this an endpoint is created in AWS api gateway so that you can invoke this framework via API calls.

This is designed for use by staging environments and automated testing suites

FOR THE LOVE OF GOD, NEVER USE THIS IN PRODUCTION!!

To deploy this new lambda function:

INSTALLATION

  • Ensure you are working within a virtualenv
  • Install stuff from the requirements.txt attached
  • Ensure that you have aws creds configures in ~/.aws/credentials
  • These AWS creds need full lambda access
  • Create or specify a S3 bucket to be used for data card details

APPLY CREDS

  • Replace {Your S3 Bucket} in zappa_settings.json with your bucket name
  • Replace {Your customer ID for railsbank} in flask_app/RailsbankCardStubs.py
  • Replace {Your webhook secret for your Railsbank play account } in flask_app/RailsbankCardStubs.py
  • Replace {Your s3 bucket name} in flask_app/s3.py
  • Replace {your railsbank staging API key} with your railsbank play api key

TAKEOFF!

  • run zappa init
  • run zappa deploy

Optional extras

If you are like me and have the short term memory of a goldfish, you can add a custom url for this suite. To do this:

  • Create a Customer Domain Name in API gateway
  • Attach your appropriate TLS certificate in AWS Certificate manager
  • Wherever you set your domains DNS settings, create a CNAME record to the API Gateway domain name cloudfront url that was created with your API gateway Customer Domain Name.

railsbank_mock_card_endpoints's People

Contributors

brucey31 avatar

Watchers

 avatar  avatar

Forkers

climam

railsbank_mock_card_endpoints's Issues

What about the "Card file"

Hey man! Thank you for this project... we are having the same issue (no Card in PLAY)... I was wondering if you can share a bit more information about what that "card file" is and in which format it should be. Where did you find some card data for the mock?

Oh, and btw did you find a way to generate "card transactions" too?

Thanks again!

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.