Sfoglia il codice sorgente

Merge branch 'develop' of https://github.com/frappe/frappe into 12928-OTPLoginFix

 Conflicts:
	frappe/__init__.py
pull/2/head
conncampbell 4 anni fa
parent
commit
8855a75606
17 ha cambiato i file con 9 aggiunte e 31 eliminazioni
  1. +1
    -2
      payments/payment_gateways/doctype/braintree_settings/braintree_settings.py
  2. +0
    -2
      payments/payment_gateways/doctype/braintree_settings/test_braintree_settings.py
  3. +1
    -2
      payments/payment_gateways/doctype/paypal_settings/paypal_settings.py
  4. +2
    -3
      payments/payment_gateways/doctype/paytm_settings/paytm_settings.py
  5. +0
    -2
      payments/payment_gateways/doctype/paytm_settings/test_paytm_settings.py
  6. +1
    -2
      payments/payment_gateways/doctype/razorpay_settings/razorpay_settings.py
  7. +1
    -2
      payments/payment_gateways/doctype/stripe_settings/stripe_settings.py
  8. +0
    -2
      payments/payment_gateways/doctype/stripe_settings/test_stripe_settings.py
  9. +0
    -1
      payments/payments/doctype/payment_gateway/payment_gateway.py
  10. +0
    -2
      payments/payments/doctype/payment_gateway/test_payment_gateway.py
  11. +2
    -2
      payments/public/js/razorpay.js
  12. +0
    -1
      payments/templates/pages/braintree_checkout.py
  13. +0
    -1
      payments/templates/pages/payment_cancel.py
  14. +0
    -2
      payments/templates/pages/payment_success.py
  15. +0
    -1
      payments/templates/pages/paytm_checkout.py
  16. +1
    -3
      payments/templates/pages/razorpay_checkout.py
  17. +0
    -1
      payments/templates/pages/stripe_checkout.py

+ 1
- 2
payments/payment_gateways/doctype/braintree_settings/braintree_settings.py Vedi File

@@ -2,12 +2,11 @@
# Copyright (c) 2018, Frappe Technologies and contributors
# For license information, please see license.txt

from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
import braintree
from frappe import _
from six.moves.urllib.parse import urlencode
from urllib.parse import urlencode
from frappe.utils import get_url, call_hook_method
from frappe.integrations.utils import create_request_log, create_payment_gateway



+ 0
- 2
payments/payment_gateways/doctype/braintree_settings/test_braintree_settings.py Vedi File

@@ -1,8 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies and Contributors
# See license.txt
from __future__ import unicode_literals

import unittest

class TestBraintreeSettings(unittest.TestCase):


+ 1
- 2
payments/payment_gateways/doctype/paypal_settings/paypal_settings.py Vedi File

@@ -63,12 +63,11 @@ More Details:

"""

from __future__ import unicode_literals
import frappe
import json
import pytz
from frappe import _
from six.moves.urllib.parse import urlencode
from urllib.parse import urlencode
from frappe.model.document import Document
from frappe.integrations.utils import create_request_log, make_post_request, create_payment_gateway
from frappe.utils import get_url, call_hook_method, cint, get_datetime


+ 2
- 3
payments/payment_gateways/doctype/paytm_settings/paytm_settings.py Vedi File

@@ -2,10 +2,9 @@
# Copyright (c) 2020, Frappe Technologies and contributors
# For license information, please see license.txt

from __future__ import unicode_literals
import json
import requests
from six.moves.urllib.parse import urlencode
from urllib.parse import urlencode

import frappe
from frappe.model.document import Document
@@ -59,7 +58,7 @@ def get_paytm_params(payment_details, order_id, paytm_config):

# initialize a dictionary
paytm_params = dict()
redirect_uri = get_request_site_address(True) + "/api/method/frappe.integrations.doctype.paytm_settings.paytm_settings.verify_transaction"




+ 0
- 2
payments/payment_gateways/doctype/paytm_settings/test_paytm_settings.py Vedi File

@@ -1,8 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2020, Frappe Technologies and Contributors
# See license.txt
from __future__ import unicode_literals

# import frappe
import unittest



+ 1
- 2
payments/payment_gateways/doctype/razorpay_settings/razorpay_settings.py Vedi File

@@ -60,14 +60,13 @@ For razorpay payment status is Authorized

"""

from __future__ import unicode_literals
import frappe
from frappe import _
import json
import hmac
import razorpay
import hashlib
from six.moves.urllib.parse import urlencode
from urllib.parse import urlencode
from frappe.model.document import Document
from frappe.utils import get_url, call_hook_method, cint, get_timestamp
from frappe.integrations.utils import (make_get_request, make_post_request, create_request_log,


+ 1
- 2
payments/payment_gateways/doctype/stripe_settings/stripe_settings.py Vedi File

@@ -2,11 +2,10 @@
# Copyright (c) 2017, Frappe Technologies and contributors
# For license information, please see license.txt

from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from frappe import _
from six.moves.urllib.parse import urlencode
from urllib.parse import urlencode
from frappe.utils import get_url, call_hook_method, cint, flt
from frappe.integrations.utils import make_get_request, make_post_request, create_request_log, create_payment_gateway



+ 0
- 2
payments/payment_gateways/doctype/stripe_settings/test_stripe_settings.py Vedi File

@@ -1,8 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies and Contributors
# See license.txt
from __future__ import unicode_literals

import unittest

class TestStripeSettings(unittest.TestCase):


+ 0
- 1
payments/payments/doctype/payment_gateway/payment_gateway.py Vedi File

@@ -2,7 +2,6 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt

from __future__ import unicode_literals
import frappe
from frappe.model.document import Document



+ 0
- 2
payments/payments/doctype/payment_gateway/test_payment_gateway.py Vedi File

@@ -1,8 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals

import frappe
import unittest



+ 2
- 2
payments/public/js/razorpay.js Vedi File

@@ -3,7 +3,7 @@
Razorpay Payment

1. Include checkout script in your code
<script type="text/javascript" src="/assets/js/checkout.min.js"></script>
{{ include_script('checkout.bundle.js) }}

2. Create the Order controller in your backend
def get_razorpay_order(self):
@@ -145,4 +145,4 @@ frappe.require('https://checkout.razorpay.com/v1/checkout.js').then(() => {
}
}
}
});
});

+ 0
- 1
payments/templates/pages/braintree_checkout.py Vedi File

@@ -1,6 +1,5 @@
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import flt


+ 0
- 1
payments/templates/pages/payment_cancel.py Vedi File

@@ -1,7 +1,6 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt

from __future__ import unicode_literals
import frappe

def get_context(context):


+ 0
- 2
payments/templates/pages/payment_success.py Vedi File

@@ -1,8 +1,6 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt

from __future__ import unicode_literals

import frappe
no_cache = True



+ 0
- 1
payments/templates/pages/paytm_checkout.py Vedi File

@@ -1,6 +1,5 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
import json


+ 1
- 3
payments/templates/pages/razorpay_checkout.py Vedi File

@@ -1,11 +1,9 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import flt, cint
import json
from six import string_types

no_cache = 1

@@ -47,7 +45,7 @@ def get_api_key():
def make_payment(razorpay_payment_id, options, reference_doctype, reference_docname, token):
data = {}

if isinstance(options, string_types):
if isinstance(options, str):
data = json.loads(options)

data.update({


+ 0
- 1
payments/templates/pages/stripe_checkout.py Vedi File

@@ -1,6 +1,5 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import cint, fmt_money


Caricamento…
Annulla
Salva