Code Monkey home page Code Monkey logo

recurly-js-mock's Introduction

recurly-js-mock

Greenkeeper badge Build Status npm

A tiny service returning Recurly.js tokens for automated test scenarios

What it does

This service returns Recurly.js tokens for automated test scenarios by running a headless browser in the background, entering user-provided data into a minimal payment form and submitting the data to Recurly.

How it works

Single-run mode

  1. Spin up a headless browser (phantomjs via the phantom node interface)
  2. Load a HTML file containing a minimal payment form
  3. Load and configure Recurly.js, this will inject the hosted credit card fields
  4. Fill the form with either user-provided or default values
  5. Submit the form and retrieve the Recurly.js token
  6. Shut down the headless browser and return the token

Daemon mode

Not yet implemented.

Using the CLI

If you installed this package via npm, this package's CLI can be accessed as follows:

$ recurly-js-mock --key <your-recurly-public-api-key>
$recurly-js-mock --help

Usage: recurlyJsMockCLI [options]


Options:

  -V, --version             output the version number
  -k, --key <value>         public key for Recurly.js
  -n, --number [value]      the credit card's number
  -m, --month [value]       the credit card's expiration month
  -y, --year [value]        the credit card's expiration year
  -f, --firstName [value]   first name
  -l, --lastName [value]    first name
  -q, --cvv [value]         the credit card's CVV
  -a, --address1 [value]    address field 1
  -b, --address2 [value]    address field 2
  -c, --city [value]        city
  -o, --country [value]     country, e.g. "US"
  -p, --postalCode [value]  postal code
  -t, --phone [value]       phone number
  -s, --state [value]       state
  -x, --vatNumber [value]   VAT number
  -y, --logLevel [level]    log level [error]
  -h, --help                output usage information

On success, the CLI will return the Recurly.js token.

Using as library

This application is written in TypeScript. To consume its functionality in another project, import the library

import { RecurlyJsMock } from "./recurlyJsMock";

and generate a Recurly.js token

RecurlyJsMock.getTokenSingleRun("<your-recurly-public-api-key>")
  .then((token) => console.log(token.id));

which can be used in automated test scenarios.

Building locally

To build from source locally, clone this repository and run

$ npm install
$ npm run build

License

Copyright (c) Tapkey GmbH. All rights reserved.

Licensed under the Apache License 2.0

recurly-js-mock's People

Contributors

greenkeeper[bot] avatar moritzgloeckl avatar sebastianhaas avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

recurly-js-mock's Issues

An in-range update of deepmerge is breaking the build 🚨

The dependency deepmerge was updated from 2.1.1 to 2.2.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

deepmerge is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 14 commits.

  • 1d66898 2.2.0
  • 503e7c3 Changelog for 2.2.0
  • 246205c package-lock noise
  • af971b1 Merge pull request #119 from msssk/add-typescript-defs
  • 0d8bd06 Set TS version at 2.2.2 for Partial
  • d5182ab Set TS version exactly to 2.0.0
  • b643a84 Simplify TS test
  • 1de5a17 Add TypeScript definitions and test
  • 38f03f0 Merge pull request #112 from CWSites/master
  • cb37e26 adjusting the name of legacy array merge to be more clear
  • eb824c9 making adjustments based on feedback
  • 0927ac0 adjusting general note regarding arrayMerge`
  • b030f6d clarifying overwriteMerge and legacyArrayMerge
  • 3b42132 cleaning up documentation of arrayMerge options

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of commander is breaking the build 🚨

Version 2.18.0 of commander was just published.

Branch Build failing 🚨
Dependency commander
Current Version 2.17.1
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

commander is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes v2.18.0
  • Standardize help output (#853)
  • chmod 644 travis.yml (#851)
  • add support for execute typescript subcommand via ts-node (#849)
Commits

The new version differs by 5 commits.

  • 54b7f14 version bump 2.18.0
  • 713db77 Standardize help output (#853)
  • af17996 chmod 644 travis.yml
  • 8bcc493 Merge pull request #849 from KillWolfVlad/feature/executeSubCommand-tsnode
  • bf47dcc add support for execute typescript subcommand via ts-node

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

Once you have installed CI on this repository, you’ll need to re-trigger Greenkeeper’s initial Pull Request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper integration’s white list on Github. You'll find this list on your repo or organiszation’s settings page, under Installed GitHub Apps.

An in-range update of @types/deepmerge is breaking the build 🚨

Version 1.3.2 of @types/deepmerge just got published.

Branch Build failing 🚨
Dependency @types/deepmerge
Current Version 1.3.1
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

@types/deepmerge is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of request is breaking the build 🚨

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 2.84.0 of request was just published.

Branch Build failing 🚨
Dependency request
Current Version 2.83.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

request is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 6 commits.

  • d77c839 Update changelog
  • 4b46a13 2.84.0
  • 0b807c6 Merge pull request #2793 from dvishniakov/2792-oauth_body_hash
  • cfd2307 Update hawk to 7.0.7 (#2880)
  • efeaf00 Fixed calculation of oauth_body_hash, issue #2792
  • 253c5e5 2.83.1

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @types/node is breaking the build 🚨

Version 8.5.5 of @types/node was just published.

Branch Build failing 🚨
Dependency @types/node
Current Version 8.5.4
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

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.