Skip to main content

A tool to fund WatCard in an easy way

Project description

fund-my-watcard

Build Status PyPI PyPI - Python Version

This tool helps you add funds to your WatCard easily. I wrote this tool because I am too lazy to do it by hand everytime.

Installation

pip3 install --upgrade fund-my-watcard

Usage

teachertian@v1040-wn-rt-c-83-249 ~/PycharmProjects/fundmywatcard: watcard
usage: watcard [-h] [-c | -f FUND | -v | -e | -d | -r | -va | -t]

Fund my WatCard: A tool that add funds to your WatCard easily.

optional arguments:
  -h, --help            show this help message and exit
  -c, --config          generate the config file
  -f FUND, --fund FUND  the amount to add into the WatCard
  -v, --version         show the version of fund-my-watcard
  -e, --encrypt         encrypt the config file with user defined password
  -d, --decrypt         decrypt the config file so you can edit it
  -r, --reset           reset the config file
  -va, --valid          check the config files for errors
  -t, --transactions    review the previous transactions

One important step before funding is to fill the config file .watcard_config, which is generated and stored under the user directory. Type watcard --config to initialize and edit the config file.

An example of .watcard_config:

{
  "userName": "WatIAM username",
  "password": "WatIAM password",
  "ordName": "Name on the credit card",
  "phoneNumber": "Phone number",
  "address1": "Home address 1",
  "address2": "Home address 2 (Blank if no address2)",
  "ordPostalCode": "Postal code",
  "ordCity": "City",
  "ordCountry": "Country (Canada by default)",
  "ordProvince": "Province (Ontario by default)",
  "ordEmailAddress": "Email address",
  "paymentMethod": "Payment method ('CC' for 'Credit Card')",
  "trnCardOwner": "Card owner",
  "trnCardType": "Card type ('VI' for 'Visa', 'MC' for 'Master Card', see more card types below)",
  "trnCardNumber": "Card number",
  "trnExpMonth": "Expiry month",
  "trnExpYear": "Expiry year",
  "trnCardCvd": "Card CVD (3 digit number on the back of the card)",
  "encrypted": "False"
}

An example of filled .watcard_config:

{
  "userName": "s123zhang",
  "password": "1234567",
  "ordName": "San Zhang",
  "phoneNumber": "123 456 7890",
  "address1": "123 Queen Street West",
  "address2": "",
  "ordPostalCode": "A1B2C3",
  "ordCity": "Waterloo",
  "ordCountry": "Canada",
  "ordProvince": "Ontario",
  "ordEmailAddress": "zhangsan@gmail.com",
  "paymentMethod": "CC",
  "trnCardOwner": "San Zhang",
  "trnCardType": "MC",
  "trnCardNumber": "1234567890123456",
  "trnExpMonth": "01",
  "trnExpYear": "25",
  "trnCardCvd": "123",
  "encrypted": "False"
}

Payment Method should be CC (Credit Card). Do not support Interac Online.

Card Type can be MC (Mastercard), VI (Visa), PV (VISA Debit), MD (Debit Mastercard) or AM (AMEX).

After filling the config file, try watcard --fund 10 to add 10 dollars to your account. At the next time, no need to edit config file (unless you want to change some information), just use watcard --fund to fund your watcard easily, cheers!

Troubleshooting

If you run into errors while using watcard --fund, it might be caused by your config file.

Please use watcard --valid to check for errors in your config file.

If that doesn't work, just reset your config file with watcard --reset and fill in your information again.

Docker Image

We also maintain a docker image for fund-my-watcard:

https://hub.docker.com/r/faushine/fund-my-watcard

Pull image from docker-hub:

 docker pull faushine/fund-my-watcard:0.4.1

Create and edit .watcard_config (There is a template of .watcard_config in the folder docker, you may want to edit it directly).

Run container and mount configuration to the container:

docker run -it  -v /absolute/path/of/.watcard_config:/root/.watcard_config faushine/fund-my-watcard:0.3.1

Contributing

Please install dev-requirements.txt instead of requirements.txt. After that, run make init to install the pre-commit hook to force PEP8 style checking.

Plan

Check kanban board to see our future plan.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fund-my-watcard-0.5.1.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

fund_my_watcard-0.5.1-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file fund-my-watcard-0.5.1.tar.gz.

File metadata

  • Download URL: fund-my-watcard-0.5.1.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.5rc1

File hashes

Hashes for fund-my-watcard-0.5.1.tar.gz
Algorithm Hash digest
SHA256 d04943de5a7245c064b78cf4abc025c26afd485c3bd8b42bf430662517e8bcc1
MD5 4a89fcbd9ea996ef904900835d919ff1
BLAKE2b-256 3c6a37f448f99626251a5bb1415f59a74439bb89e2673bdba31061e7f24af429

See more details on using hashes here.

File details

Details for the file fund_my_watcard-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: fund_my_watcard-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 24.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.5rc1

File hashes

Hashes for fund_my_watcard-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d3fbbb8306ff89625d89e2a4a678ac9fd0f46d21206204f3aaf47d19e3dd9176
MD5 cf895598e3b6592b95a71a6c33ab46ad
BLAKE2b-256 0afb5fdfdebcd8ae248ef05c784eb4aaf2794ef664e01dfae3f85cbd46e835e3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page