Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
163 commits
Select commit Hold shift + click to select a range
7d71eb4
fix: update stripe redirect URL to include reference doctype
saullo Nov 5, 2023
523b184
Merge pull request #54 from saullo/develop
uhrjun Nov 12, 2023
f009002
fix: payment sucess redirect error
rohitwaghchaure Jan 23, 2024
54cc513
Merge pull request #64 from rohitwaghchaure/fixed-orders-redirect-issue
rohitwaghchaure Jan 23, 2024
cf3e69a
Update gocardless_settings.json
trustedcomputer Jan 29, 2024
45c63c4
fix: typo in GoCardless Settings name
batonac Mar 5, 2024
d028ba0
Merge pull request #70 from batonac/patch-1
NagariaHussain Mar 12, 2024
1d19233
Merge pull request #66 from trustedcomputer/develop
NagariaHussain Mar 28, 2024
f84edf9
fix: header_img field schema (#83)
trustedcomputer May 15, 2024
e87d8de
fix: stripe checkout
pateljannat Sep 30, 2024
4ea0c93
chore: fixed linters
pateljannat Sep 30, 2024
e8f3fa1
chore: bumped up semgrep
pateljannat Sep 30, 2024
1e58f5a
Merge pull request #100 from pateljannat/stripe-checkout-issue
pateljannat Sep 30, 2024
5cb6239
fix: stripe page styling
pateljannat Oct 1, 2024
1a3ba54
Merge pull request #101 from pateljannat/fix-stripe-checkout-styles
pateljannat Oct 1, 2024
3b74e18
chore: remove manifest
blaggacao Oct 2, 2024
55580c2
chore: add tooling files to gitignore
blaggacao Oct 2, 2024
7fd0913
ci: adopt best practice
blaggacao Oct 2, 2024
c47ec6d
ci: does it work?
blaggacao Oct 2, 2024
7ce9dd5
Merge pull request #102 from blaggacao/ci/adopt-best-practice
blaggacao Oct 2, 2024
a438018
chore: use ruff, prettier & eslint
blaggacao Oct 2, 2024
63a4acf
chore: apply pre-commit
blaggacao Oct 2, 2024
3c8cf48
chore: add style commit to blame ignore
blaggacao Oct 2, 2024
fe53c4e
ci: add labeler config
blaggacao Oct 2, 2024
cecf0be
style: ruff format
blaggacao Sep 16, 2024
363f73d
chore: add style commit to blame ignore
blaggacao Oct 2, 2024
d2d7278
chore: ignore undue lint error
blaggacao Oct 2, 2024
8b57e6d
Merge pull request #103 from blaggacao/refactor-formatting
blaggacao Oct 2, 2024
ef713a2
docs: mention ongoing work
blaggacao Oct 10, 2024
22581cc
fix: type conversion #62 (#109)
Oswin-san Oct 10, 2024
1c3e0ae
refactor: clear API details
ruthra-kumar Oct 25, 2024
dc92db5
refactor: UI to clear razorpay api details
ruthra-kumar Oct 25, 2024
80272ce
chore: translatable label
ruthra-kumar Oct 28, 2024
d80039b
Merge pull request #112 from ruthra-kumar/clear_button_for_razorpay_s…
ruthra-kumar Oct 28, 2024
a827330
refactor: throw for cancelled integration requests
ruthra-kumar Nov 4, 2024
9030aec
Merge pull request #115 from ruthra-kumar/throw_for_cancelled_and_fai…
ruthra-kumar Nov 7, 2024
2422937
fix: exception on braintree success page
ruthra-kumar Nov 21, 2024
7069b59
Merge pull request #122 from ruthra-kumar/braintree_success_message_e…
ruthra-kumar Nov 21, 2024
cd32ddd
fix: get parameters on both success and failed page
ruthra-kumar Nov 21, 2024
b98e5fb
Merge pull request #125 from ruthra-kumar/set_get_parameters_for_both…
ruthra-kumar Nov 21, 2024
e50bb16
refactor: better handling of get parameters
ruthra-kumar Nov 22, 2024
6655e68
Merge pull request #126 from ruthra-kumar/better_handling_of_get_para…
ruthra-kumar Nov 22, 2024
941af4d
refactor: drop pytz
akhilnarang Dec 9, 2024
4919784
Merge pull request #129 from akhilnarang/drop-pytz-usage
akhilnarang Dec 9, 2024
70d8ac7
chore: fix broken CI
ruthra-kumar May 6, 2025
6fc587b
test(mpesa-settings): add opening entry for new POS profile
Bhavan23 May 9, 2025
2f14fe3
Merge pull request #143 from aerele/fix/broken-ci
ruthra-kumar May 9, 2025
5b64754
chore: extend supported currencies list for Razorpay.
Karuppasamy923 May 6, 2025
58c92ad
chore: Update formatings
Karuppasamy923 May 6, 2025
6012958
Merge pull request #141 from aerele/extend-razorpay-supported-currencies
ruthra-kumar May 9, 2025
bc6cffe
ci: trigger
ruthra-kumar Jun 19, 2025
1b0b2aa
Merge pull request #152 from ruthra-kumar/trigger_ci
ruthra-kumar Jun 19, 2025
e3a9d4c
chore: include setuptools
ruthra-kumar Jun 19, 2025
6de4368
Merge pull request #153 from ruthra-kumar/install_setuptools
ruthra-kumar Jun 19, 2025
1367878
fix: make Stripe checkout page responsive
ravibharathi656 Jun 19, 2025
0030055
Merge pull request #154 from aerele/stripe-checkout-responsive
Vigneshsekar Jun 19, 2025
6db0e22
fix(Razorpay): create order if not provided for payment link
NagariaHussain Jul 31, 2025
beb7814
Merge pull request #158 from NagariaHussain/fix-razorpay-payment-link
ruthra-kumar Aug 1, 2025
304713f
fix: flaky mpesa tests
ruthra-kumar Aug 1, 2025
08da2b2
Merge pull request #159 from ruthra-kumar/fix_flaky_mpesa_tests
ruthra-kumar Aug 18, 2025
5489787
fix: image condition (#162)
barredterra Sep 15, 2025
957c5c5
chore: bump actions/cache to v4 (#131)
barredterra Sep 15, 2025
2c36c98
refactor: delete custom fields (#161)
barredterra Sep 15, 2025
c567e06
ci: bump github actions to supported versions (#169) (#171)
mergify[bot] Sep 15, 2025
ccca17c
refactor: inline immediately returned variable (#163)
barredterra Sep 15, 2025
7665c57
fix(Web Form): extend instead of overriding (#164)
barredterra Sep 15, 2025
49b4f63
feat: incorporate GoCardless payment request transaction_date (#80)
batonac Sep 15, 2025
fcca37e
feat: implement Paymob payment gateway integration supporting Payment…
Carlos9k Oct 22, 2025
19ca290
refactor: improve Paymob callback flow readability and structure
Carlos9k Oct 23, 2025
dd05aef
style: adjust Get Access Token button style to avoid multiple primary…
Carlos9k Oct 24, 2025
8e2e0bd
chore: resolve ruff lint issues
Carlos9k Oct 24, 2025
6cf407f
chore: fix ruff lint issues and update deprecated typing imports
Carlos9k Oct 24, 2025
61a718b
refactor: use frappe utils for HTTP requests
Carlos9k Oct 24, 2025
c850aca
chore: remove mandatory requirement for HMAC field
Carlos9k Oct 29, 2025
0a8534b
Merge pull request #180 from Axentorllc/ft/paymob-integration
NagariaHussain Nov 12, 2025
1d2e5f2
Merge pull request #186 from Axentorllc/feat/paymob-integration
meaziz Nov 26, 2025
678321a
feat: add PayPal error logging (#193)
Rl0007 Jan 12, 2026
92a9cfb
fix: order_id should be top-level option
NagariaHussain Jan 21, 2026
b108037
chore: bump razorpay
mihir-kandoi Feb 9, 2026
66215cf
Merge pull request #197 from frappe/bump-razorpay
mihir-kandoi Feb 9, 2026
edc10e2
fix(stripe): improve mobile card input, error style
raizasafeel Mar 13, 2026
3cebd94
Merge pull request #201 from raizasafeel/fix/mobile-ui-stripe
raizasafeel Mar 13, 2026
2ebef4d
[fix] paypal sandboxing to test dummy payments (#2281)
saurabh6790 Nov 10, 2016
304a7b7
[urgent][fix] convert use_sandbox param to integer to avoid false dat…
saurabh6790 Nov 28, 2016
2ce789f
Third party apps portal (#3782)
omkarghaisas Jul 27, 2017
4f42b20
Replaced all instances of basestring with six.string_types
adityahase Aug 9, 2017
6c79e69
Braintree integration (#4971)
chdecultot Feb 16, 2018
4a7d27f
[fix] validate minimum transaction amount while creating a charge on …
saurabh6790 Mar 19, 2018
f9f8aaa
[New Feature] Google Calendar Connector (#5266)
chdecultot Apr 6, 2018
42b007f
Allow several Stripe accounts (#5573)
chdecultot May 23, 2018
c467292
Subscriptions + Elements for Stripe payments (#5602)
chdecultot Jun 11, 2018
c7ba774
[test] [style]
rmehta Jul 10, 2018
65ccd90
Support for razorpay subscription and addons
saurabh6790 Aug 30, 2018
fc9c2b3
[fix] razorpay subscription
saurabh6790 Aug 30, 2018
d598979
setup upfront amount
saurabh6790 Sep 5, 2018
7bcddb3
Provision to cancel existing subscription
saurabh6790 Sep 10, 2018
b135872
setup addons on razorpay
saurabh6790 Sep 18, 2018
5e9a1c8
finalize subscription razorpay
saurabh6790 Sep 21, 2018
79b31ab
finalize recurring payments for paypal
saurabh6790 Sep 21, 2018
87a2f45
fix for immediate subscriptions
saurabh6790 Sep 25, 2018
b405de7
provision to handel paypal and razoapay subscription charge notificat…
saurabh6790 Oct 2, 2018
9a7ee99
[fix] add validations on payment notification callback
saurabh6790 Oct 5, 2018
f1d1212
[fix] do not cache payment success page
saurabh6790 Oct 10, 2018
b09f0ad
[fix] razorpay subscription cancellation
saurabh6790 Oct 17, 2018
9e3f8b7
Customize payment success message (#6460)
saurabh6790 Nov 29, 2018
c94a7e5
fix: before capturing payment first check payment status
saurabh6790 May 21, 2019
f3335bf
fix: check payment status before capturing the payment
saurabh6790 May 21, 2019
4c4a268
fix: if start date exist only then pass it while creating subscription
saurabh6790 Jun 25, 2019
9eda1c2
feat: added orders API
scmmishra Nov 13, 2019
2bc20f9
fix: fixed post request
scmmishra Nov 13, 2019
cc33899
feat: updated client API
scmmishra Nov 13, 2019
865e173
style: added comments and cleaned up API
scmmishra Nov 14, 2019
5a9786c
style: use tabs
scmmishra Nov 14, 2019
524a502
refactor: auto fetch API key
scmmishra Nov 14, 2019
71a0d24
style: liting fixes
scmmishra Nov 14, 2019
fb7173a
style: whitespace fixes
scmmishra Nov 14, 2019
cb44062
style: whitespace fixes
scmmishra Nov 14, 2019
4589d10
Update frappe/integrations/doctype/razorpay_settings/razorpay_setting…
scmmishra Nov 19, 2019
b7b99b2
Update frappe/integrations/doctype/razorpay_settings/razorpay_setting…
scmmishra Nov 19, 2019
eacb0e9
feat: blink checkout
Mangesh-Khairnar Apr 8, 2020
4fdfbb4
fix: add finalize request to complete the transaction
Mangesh-Khairnar Apr 22, 2020
1cf315d
chore: remove initial validation check
Mangesh-Khairnar Apr 22, 2020
09c8bc9
feat: added webhook hmac verification
scmmishra May 22, 2020
7784726
refactor: use six instead of sys.version_info
scmmishra May 29, 2020
164c5d9
style: linting fixes
scmmishra May 29, 2020
9cae27d
feat: make verification function python 3 only
scmmishra May 29, 2020
d027003
fix: update the checksum logic
Mangesh-Khairnar Jun 8, 2020
1a49f91
fix(paytm-integration): use checksum library to generate/verify checksum
Mangesh-Khairnar Jul 20, 2020
b08162c
feat: add init client API
scmmishra Sep 4, 2020
84ef0de
refactor: don't attach secret to self (#11428)
scmmishra Sep 7, 2020
b501af8
feat(app): move /desk to /app
rmehta Nov 11, 2020
ff24333
refactor: Delete Qunit test files
frappe-bot Apr 27, 2021
79b2f3a
chore: Drop dead and deprecated code
gavindsouza May 26, 2021
bbb87d3
style: format all python files using black (#16453)
surajshetty3416 Apr 12, 2022
1ccbf18
fix: `frappe.log_error` arguments while capturing razorpay payment fa…
ruchamahabal May 1, 2022
d35cd80
refactor: Integration Request
sagarvora Apr 13, 2022
1efcd82
refactor: Remove unused imports & code
ChillarAnand May 16, 2022
3b77f97
fix: remove bare exception catching
ankush Jun 28, 2022
c7e6421
refactor: clean up code to py310 supported features (#17367)
ankush Jul 1, 2022
bd013d8
feat: Initialize App
phot0n Jul 22, 2022
15b7ede
refactor(minor): pay -> payments
phot0n Jul 22, 2022
e43275f
chore: remove gcalendar template and third party apps template include
phot0n Jul 24, 2022
4669b22
chore: update requirements
phot0n Jul 24, 2022
c3ecc7a
feat: add payment and custom field creation utils
phot0n Jul 24, 2022
88147e4
fix: import paths and doctype modules
phot0n Jul 24, 2022
245741f
fix: method paths to accomodate new structure
phot0n Jul 24, 2022
b95a1d9
fix: before install hook for not installing
phot0n Jul 26, 2022
dc73f79
ci: add precommit and semantic commit workflow
phot0n Aug 1, 2022
1af0bb2
ci: remove isort step from pre-commit config
phot0n Aug 1, 2022
6930d49
Revert "refactor: use renamed timezone utils"
ankush Mar 7, 2023
f910de2
Revert "Revert "refactor: use renamed timezone utils""
phot0n Mar 12, 2023
54fe386
chore: bump braintree (#34)
ankush Jun 27, 2023
8f203f0
build: add pycryptodome dependency
ankush Sep 2, 2023
bb8d38c
build: switch to pyproject & flint (#42)
blaggacao Sep 13, 2023
8533d31
style: format code
s-aga-r Sep 25, 2023
68f53ce
refactor: add import guard for erpnext
s-aga-r Sep 27, 2023
5a8f607
chore: loosen pycryptodome and install mariadb
ankush Oct 18, 2023
0658ac1
refactor: throw for cancelled integration requests
ruthra-kumar Nov 4, 2024
a306978
refactor: clear API details
ruthra-kumar Oct 25, 2024
95e14ad
fix: stripe checkout
pateljannat Mar 18, 2025
bcd196e
chore: fixed linters
pateljannat Mar 18, 2025
a224c1b
chore: fix broken CI
ruthra-kumar May 6, 2025
31b317c
Merge branch 'version-15' into develop-to-v15
ravibharathi656 Mar 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 130 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
{
"env": {
"browser": true,
"node": true,
"es2022": true
},
"parserOptions": {
"sourceType": "module"
},
"extends": "eslint:recommended",
"rules": {
"indent": "off",
"brace-style": "off",
"no-mixed-spaces-and-tabs": "off",
"no-useless-escape": "off",
"space-unary-ops": ["error", { "words": true }],
"linebreak-style": "off",
"quotes": ["off"],
"semi": "off",
"camelcase": "off",
"no-unused-vars": "off",
"no-console": ["warn"],
"no-extra-boolean-cast": ["off"],
"no-control-regex": ["off"]
},
"root": true,
"globals": {
"frappe": true,
"Vue": true,
"SetVueGlobals": true,
"erpnext": true,
"hub": true,
"$": true,
"jQuery": true,
"moment": true,
"hljs": true,
"Awesomplete": true,
"CalHeatMap": true,
"Sortable": true,
"Showdown": true,
"Taggle": true,
"Gantt": true,
"Slick": true,
"PhotoSwipe": true,
"PhotoSwipeUI_Default": true,
"fluxify": true,
"io": true,
"c3": true,
"__": true,
"_p": true,
"_f": true,
"repl": true,
"Class": true,
"locals": true,
"cint": true,
"cstr": true,
"cur_frm": true,
"cur_dialog": true,
"cur_page": true,
"cur_list": true,
"cur_tree": true,
"cur_pos": true,
"msg_dialog": true,
"is_null": true,
"in_list": true,
"has_common": true,
"posthog": true,
"has_words": true,
"validate_email": true,
"open_web_template_values_editor": true,
"get_number_format": true,
"format_number": true,
"format_currency": true,
"round_based_on_smallest_currency_fraction": true,
"roundNumber": true,
"comment_when": true,
"replace_newlines": true,
"open_url_post": true,
"toTitle": true,
"lstrip": true,
"strip": true,
"strip_html": true,
"replace_all": true,
"flt": true,
"precision": true,
"md5": true,
"CREATE": true,
"AMEND": true,
"CANCEL": true,
"copy_dict": true,
"get_number_format_info": true,
"print_table": true,
"Layout": true,
"web_form_settings": true,
"$c": true,
"$a": true,
"$i": true,
"$bg": true,
"$y": true,
"$c_obj": true,
"$c_obj_csv": true,
"refresh_many": true,
"refresh_field": true,
"toggle_field": true,
"get_field_obj": true,
"get_query_params": true,
"unhide_field": true,
"hide_field": true,
"set_field_options": true,
"getCookie": true,
"getCookies": true,
"get_url_arg": true,
"get_server_fields": true,
"set_multiple": true,
"QUnit": true,
"Chart": true,
"Cypress": true,
"cy": true,
"describe": true,
"expect": true,
"it": true,
"context": true,
"before": true,
"beforeEach": true,
"onScan": true,
"extend_cscript": true,
"localforage": true,
"Plaid": true
}
}
15 changes: 15 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Since version 2.23 (released in August 2019), git-blame has a feature
# to ignore or bypass certain commits.
#
# This file contains a list of commits that are not likely what you
# are looking for in a blame, such as mass reformatting or renaming.
# You can set this file as a default ignore file for blame by running
# the following command.
#
# $ git config blame.ignoreRevsFile .git-blame-ignore-revs

# pre-commit formatting ruff, eslint, prettier (automated)
63a4acf6c9fe9657fa6d7ad659465b0d5ef3d73f

# pre-commit formatting ruff, eslint, prettier (manual fixup)
cecf0bec9de2dcd176fc632e8a5348ab2f491cbe
2 changes: 1 addition & 1 deletion .github/helper/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ bench start &>> ~/frappe-bench/bench_start.log &
CI=Yes bench build --app frappe &
bench --site test_site reinstall --yes

bench --verbose --site test_site install-app payments
bench --verbose --site test_site install-app payments
4 changes: 4 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Any python files modifed but no test files modified
needs-tests:
- any: ['payments/**/*.py']
all: ['!payments/**/test*.py']
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,4 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true
verbose: true
12 changes: 12 additions & 0 deletions .github/workflows/labeller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: "Pull Request Labeler"
on:
pull_request_target:
types: [opened, reopened]

jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ tags
payments/docs/current
node_modules/
__pycache__/
.aider*
.helix
49 changes: 36 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,47 @@ repos:
- id: check-yaml
- id: debug-statements

- repo: https://github.com/asottile/pyupgrade
rev: v2.34.0
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: pyupgrade
args: ['--py310-plus']
- id: prettier
types_or: [javascript, vue, scss]
# Ignore any files that might contain jinja / bundles
exclude: |
(?x)^(
payments/public/dist/.*|
cypress/.*|
.*node_modules.*|
payments/templates/includes/.*
)$

- repo: https://github.com/adityahase/black
rev: 9cb0a69f4d0030cdf687eddf314468b39ed54119
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.44.0
hooks:
- id: black
additional_dependencies: ['click==8.0.4']
- id: eslint
types_or: [javascript]
args: ['--quiet']
# Ignore any files that might contain jinja / bundles
exclude: |
(?x)^(
payments/public/dist/.*|
cypress/.*|
.*node_modules.*|
payments/templates/includes/.*
)$

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.0
hooks:
- id: flake8
additional_dependencies: ['flake8-bugbear',]
args: ['--config', '.github/helper/flake8.conf']
- id: ruff
name: "Run ruff import sorter"
args: ["--select=I", "--fix"]

- id: ruff
name: "Run ruff linter"

- id: ruff-format
name: "Run ruff formatter"

ci:
autoupdate_schedule: weekly
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ All general utils are stored in [utils](payments/utils) directory. The utils are

[templates](payments/templates) directory has all the payment gateways' custom checkout pages.

#
## Ongoing Work
- New API design: https://github.com/frappe/payments/pull/53
- Mollie Integration: https://github.com/frappe/payments/pull/68 (awaiting the former, but you may use the branc)

## License
MIT ([license.txt](license.txt))
46 changes: 23 additions & 23 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
module.exports = {
parserPreset: 'conventional-changelog-conventionalcommits',
rules: {
'subject-empty': [2, 'never'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [
2,
'always',
[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test',
],
],
},
parserPreset: "conventional-changelog-conventionalcommits",
rules: {
"subject-empty": [2, "never"],
"type-case": [2, "always", "lower-case"],
"type-empty": [2, "never"],
"type-enum": [
2,
"always",
[
"build",
"chore",
"ci",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"test",
],
],
},
};
4 changes: 2 additions & 2 deletions payments/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@

# DocType Class
# ---------------
# Override standard doctype classes
# Extend standard doctype classes

override_doctype_class = {"Web Form": "payments.overrides.payment_webform.PaymentWebForm"}
extend_doctype_class = {"Web Form": "payments.overrides.payment_webform.PaymentWebForm"}

# Document Events
# ---------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// Copyright (c) 2018, Frappe Technologies and contributors
// For license information, please see license.txt

frappe.ui.form.on('Braintree Settings', {

});
frappe.ui.form.on("Braintree Settings", {});
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,7 @@ def create_charge_on_braintree(self):
status = "Error"
redirect_url = "payment-failed"

get_parameters = [
("doctype", self.data.reference_doctype),
("docname", self.data.reference_docname),
]
get_parameters = [("doctype", self.data.reference_doctype), ("docname", self.data.reference_docname)]
if redirect_to:
get_parameters.append(("redirect_to", redirect_to))
if redirect_message:
Expand All @@ -282,9 +279,8 @@ def create_charge_on_braintree(self):

def get_gateway_controller(doc):
payment_request = frappe.get_doc("Payment Request", doc)
return frappe.db.get_value(
"Payment Gateway", payment_request.payment_gateway, "gateway_controller"
)
return frappe.db.get_value("Payment Gateway", payment_request.payment_gateway, "gateway_controller")



def get_client_token(doc):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// Copyright (c) 2018, Frappe Technologies and contributors
// For license information, please see license.txt

frappe.ui.form.on('GoCardless Mandate', {
});
frappe.ui.form.on("GoCardless Mandate", {});
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def set_status(event):

def set_mandate_status(event):
mandates = []
if isinstance(event["links"], (list,)):
if isinstance(event["links"], list):
for link in event["links"]:
mandates.append(link["mandate"])
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
// refresh(frm) {

// },
// });
// });
Loading
Loading