Commit graph

43 commits

Author SHA1 Message Date
18alantom
c4f2335f11
fix: support public client 2025-07-04 15:05:50 +05:30
18alantom
db4a7504e5
fix: add hooks to handle cors 2025-07-04 13:18:43 +05:30
Alan
c174e9cbdc
fix: apply fixes on accepted Copilot suggestions
Update frappe/integrations/oauth2.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update frappe/integrations/README.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update frappe/integrations/utils.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update frappe/integrations/utils.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-03 15:01:47 +05:30
18alantom
5ca8ad9d84
refactor: deprecate OAuth Provider Settings
OAuth Settings has its fields now (only one)
2025-07-03 14:07:38 +05:30
18alantom
3a47801598
feat(OAuth2): support RFC 7591
This allows a client to be registered without manual intervention.
2025-07-02 13:01:37 +05:30
Akhil Narang
152c4d4b91
fix(make_request): don't blindly try to check the content-type
Ensure that the response has one first

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-06-03 18:28:22 +05:30
Akhil Narang
19b696acf6
fix(integrations): add back response.raise_for_status()
It got removed in 59ca074780, however it
should still be here, the point of that commit was to fix other
behaviour, don't exactly remember why it was removed.

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-05-08 15:14:41 +05:30
David
f9cdcfb7af
feat: allow linking of request http errors 2024-05-06 13:18:33 +02:00
Akhil Narang
59ca074780
fix: only try JSON if content-type says so (#24936)
Keep NoneType as the fallback

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-19 15:29:22 +05:30
tonspar
c12b753648
fix: make_request - prevents an error during response parsing if the response body is empty. (#24613)
* Update utils.py

Sometimes the returned response body is empty. This change prevents the error during frappe response parsing. For example DELETE request returns no content.

* Revert "Update utils.py"

This reverts commit edbfb6960a175da142e9114d8096e5f09665da1b.

* fix: Avoid parsing empty responses in make_request

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2024-02-10 08:50:22 +00:00
Akhil Narang
26ae0f3460
fix: ruff fixes
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-07 17:04:31 +05:30
Ankush Menat
de9ac89748 style: re-format with ruff 2024-02-05 18:53:33 +05:30
Hussain Nagaria
8d2137c265 docs: consistent doc strings 2023-12-18 18:27:39 +05:30
Hussain Nagaria
24c8b0fb6c docs: make_*_request utils 2023-12-17 11:59:27 +05:30
Shariq Ansari
33f729ebd3 chore: linter fix 2023-12-01 20:03:18 +05:30
tonspar
fae3685b03
feat: Patch and Delete Request to integration utils (#23525)
* Update utils.py

Adding the patch and delete request

* Update safe_exec.py

Adding the patch and delete request from integration utils.
2023-12-01 10:25:43 +05:30
Hussain Nagaria
a46308709b fix: add params in make_request arguments 2023-11-01 17:30:58 +05:30
David Arnold
086435c004
feat: add upstream json argument to integrations make_request (#22462)
* feat: add upstream json argument to integrations make_request

* style: format

[skip ci]

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-09-20 13:15:22 +05:30
phot0n
090d0321a8 chore: fix linter 2022-07-26 23:17:04 +05:30
phot0n
f71562fd49 chore: add integration request doctype back (with utils) 2022-07-26 23:17:04 +05:30
phot0n
83fe747f75 chore: remove payment utils and hooks 2022-07-26 15:11:56 +05:30
Ankush Menat
81b37cb7d2
refactor: clean up code to py310 supported features (#17367)
refactor: clean up code to py39+ supported syntax

- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes

Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
2022-07-01 11:51:05 +05:30
Sagar Vora
31440f0538 refactor: Integration Request 2022-04-13 13:37:20 +05:30
Suraj Shetty
c0c5b2ebdd
style: format all python files using black (#16453)
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30
Gavin D'souza
3446026555 chore: Update header: license.txt => LICENSE
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
2021-09-03 12:02:59 +05:30
Saqib Ansari
d6b4974bde refactor: use session.request to commonify code 2021-07-31 11:56:30 +05:30
Saqib Ansari
0fa9abde4c feat: add put request to integration utils 2021-07-13 14:35:16 +05:30
Gavin D'souza
e407b78506 chore: Drop dead and deprecated code
* Remove six for PY2 compatability since our dependencies are not, PY2
  is legacy.
* Removed usages of utils from future/past libraries since they are
  deprecated. This includes 'from __future__ ...' and 'from past...'
  statements.
* Removed compatibility imports for PY2, switched from six imports to
  standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
  versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
2021-05-26 15:31:29 +05:30
Mangesh-Khairnar
c3e636914f fix(integration-request): handle response and update status 2020-09-28 02:08:24 +05:30
Saurabh
1bc97e8f8a
feat: Offsite backup (#8241)
* feat: utility to get file size

* feat: if backup file is greater than 1gb then consider latest backup site instead of taking new

* fix: remove unwanted import

* chore: fix condition inside offsite backup utils

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* chore: change email field to notify_email

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* chore: fix deepsource issues

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* feat: add offsite_backup support for google drive

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* chore: get recipients from within send_email

pass email_field to send_email instead of calling two functions

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* chore: set flag within validate_file_size

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* feat: get latest file backup when specified

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* chore: fix deepsource issues

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* chore: fix incorrectly spelled dropbox settings

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* chore: implement file backup logic for aws s3

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* chore: fix deepsource issues

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* chore: fix deepsource issues

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

Co-authored-by: Chinmay D. Pai <chinmaydpai@gmail.com>
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2020-04-07 00:06:27 +05:30
Suraj Shetty
dee4a7336c fix(translations): Incorrect syntax 2020-01-29 15:22:35 +05:30
Saurabh
3ce7ba4e5d [fix] add validations on payment notification callback 2018-10-25 14:11:32 +05:30
Saurabh
c6e7fff3c4 [fix] call setup subscription and addons explicitly 2018-10-01 11:35:13 +05:30
Saurabh
f7c5a3ce26 fix for immediate subscriptions 2018-10-01 11:35:13 +05:30
Saurabh
5302af0dd1 remove debugging print statements 2018-10-01 11:35:13 +05:30
Saurabh
d20fd4af65 Support for paypal subscription 2018-10-01 11:35:13 +05:30
Saurabh
2749f0ebbf Support for razorpay subscription and addons 2018-10-01 11:35:13 +05:30
Charles-Henri Decultot
41598d22f0 Braintree integration (#4971)
* Braintree Integration WIP

* Braintree integration

* Link in config + settings after save

* Code cleanup

* Code cleanup

* JS beautify issue

* Codacy corrections

* Spaces to tabs
2018-02-16 15:16:23 +05:30
Aditya Hase
769338f136 Replaced all instances of basestring with six.string_types 2017-08-11 00:10:11 +05:30
Aditya Hase
375dfd601d Replaced urlparse imports with six.moves.urllib.parse (#3847) 2017-08-03 11:43:28 +05:30
tundebabzy
6fbe20caaa Except and raise statement python 3 compatible style (#3216)
* changes exception and raise statements to python 3 style

* changes except statement to python 3 style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* adds six.reraise to fix python 3 style raise statements with traceback

* fixes indentation
2017-05-11 10:51:59 +05:30
Saurabh
286b79bd90 Stripe payment integration (#2867)
* [fix] setting page for stripe

* checkout flow for stripe payment

* controller to handle stripe checkout and authorization
2017-04-06 17:27:23 +05:30
Saurabh
7620bb3789 Deprecate Integration Broker (#2831)
* [fix] remove razorpay from integration service

* [fix] clean-up js side integration service dependancies

* [fix] remove integration service, .py cleanup, move integration request to integration

* [fix] move oauth to integrations and deprecate integration broker

* [fix] mark services enabled and update integrations listing

* [fix] V7.1 and V7.2 integration service related pathch fixes and move payment gateway dotype to core module

* [fix] create payment gateway records if not exists

* [fix] module page for integrations

* [minor][fix] minor checks

* [fix] remove integration broker module only if not allocated to any doctype
2017-03-14 11:24:26 +05:30