An application with electronic payments utilities for ERPNext.
First, set up a new bench and substitute a path to the python version to use. Python should be 3.10 latest for version-14. These instructions use pyenv for managing environments.
bench init --frappe-branch version-14 {{ bench name }} --python ~/.pyenv/versions/3.10.13/bin/python3Create a new site in that bench
cd {{ bench name }}
bench new-site {{ site name }} --force --db-name {{ site name }}
bench use {{ site name }}Download apps
bench get-app payments
bench get-app erpnext --branch version-14
bench get-app electronic_payments --branch version-14 [email protected]:agritheory/electronic_payments.git Install the apps to your site
bench --site {{ site name }} install-app erpnext payments electronic_paymentsSet developer mode in site_config.json
nano sites/{{ site name }}/site_config.json
# Add this line:
"developer_mode": 1,
Install pre-commit:
# ~/frappe-bench/apps/electronic_payments/
pre-commit installAdd the site to your computer's hosts file to be able to access it via: http://{{ site name }}:[8000]. You'll need to enter your root password to allow your command line application to make edits to this file.
bench --site {{site name}} add-to-hostsLaunch your bench (note you should be using Node.js v18)
bench startOptional: install a demo Company and its data to test the Electronic Payments module's functionality
bench execute 'electronic_payments.tests.setup.before_test'To run the Stripe mock, start the docker container:
docker run --rm -it -p 12111-12112:12111-12112 stripe/stripe-mock:latestThe endpoint should be configured in the Electronic Payments Settings with the following values:
# values here / TBDTo run mypy locally:
source env/bin/activate
mypy ./apps/electronic_payments --ignore-missing-imports