@@ -2,12 +2,11 @@ | |||||
# Copyright (c) 2018, Frappe Technologies and contributors | # Copyright (c) 2018, Frappe Technologies and contributors | ||||
# For license information, please see license.txt | # For license information, please see license.txt | ||||
from __future__ import unicode_literals | |||||
import frappe | import frappe | ||||
from frappe.model.document import Document | from frappe.model.document import Document | ||||
import braintree | import braintree | ||||
from frappe import _ | 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.utils import get_url, call_hook_method | ||||
from frappe.integrations.utils import create_request_log, create_payment_gateway | from frappe.integrations.utils import create_request_log, create_payment_gateway | ||||
@@ -1,8 +1,6 @@ | |||||
# -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
# Copyright (c) 2018, Frappe Technologies and Contributors | # Copyright (c) 2018, Frappe Technologies and Contributors | ||||
# See license.txt | # See license.txt | ||||
from __future__ import unicode_literals | |||||
import unittest | import unittest | ||||
class TestBraintreeSettings(unittest.TestCase): | class TestBraintreeSettings(unittest.TestCase): | ||||
@@ -63,12 +63,11 @@ More Details: | |||||
""" | """ | ||||
from __future__ import unicode_literals | |||||
import frappe | import frappe | ||||
import json | import json | ||||
import pytz | import pytz | ||||
from frappe import _ | from frappe import _ | ||||
from six.moves.urllib.parse import urlencode | |||||
from urllib.parse import urlencode | |||||
from frappe.model.document import Document | from frappe.model.document import Document | ||||
from frappe.integrations.utils import create_request_log, make_post_request, create_payment_gateway | 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 | from frappe.utils import get_url, call_hook_method, cint, get_datetime | ||||
@@ -2,10 +2,9 @@ | |||||
# Copyright (c) 2020, Frappe Technologies and contributors | # Copyright (c) 2020, Frappe Technologies and contributors | ||||
# For license information, please see license.txt | # For license information, please see license.txt | ||||
from __future__ import unicode_literals | |||||
import json | import json | ||||
import requests | import requests | ||||
from six.moves.urllib.parse import urlencode | |||||
from urllib.parse import urlencode | |||||
import frappe | import frappe | ||||
from frappe.model.document import Document | from frappe.model.document import Document | ||||
@@ -59,7 +58,7 @@ def get_paytm_params(payment_details, order_id, paytm_config): | |||||
# initialize a dictionary | # initialize a dictionary | ||||
paytm_params = dict() | paytm_params = dict() | ||||
redirect_uri = get_request_site_address(True) + "/api/method/frappe.integrations.doctype.paytm_settings.paytm_settings.verify_transaction" | redirect_uri = get_request_site_address(True) + "/api/method/frappe.integrations.doctype.paytm_settings.paytm_settings.verify_transaction" | ||||
@@ -1,8 +1,6 @@ | |||||
# -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
# Copyright (c) 2020, Frappe Technologies and Contributors | # Copyright (c) 2020, Frappe Technologies and Contributors | ||||
# See license.txt | # See license.txt | ||||
from __future__ import unicode_literals | |||||
# import frappe | # import frappe | ||||
import unittest | import unittest | ||||
@@ -60,14 +60,13 @@ For razorpay payment status is Authorized | |||||
""" | """ | ||||
from __future__ import unicode_literals | |||||
import frappe | import frappe | ||||
from frappe import _ | from frappe import _ | ||||
import json | import json | ||||
import hmac | import hmac | ||||
import razorpay | import razorpay | ||||
import hashlib | import hashlib | ||||
from six.moves.urllib.parse import urlencode | |||||
from urllib.parse import urlencode | |||||
from frappe.model.document import Document | from frappe.model.document import Document | ||||
from frappe.utils import get_url, call_hook_method, cint, get_timestamp | 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, | from frappe.integrations.utils import (make_get_request, make_post_request, create_request_log, | ||||
@@ -2,11 +2,10 @@ | |||||
# Copyright (c) 2017, Frappe Technologies and contributors | # Copyright (c) 2017, Frappe Technologies and contributors | ||||
# For license information, please see license.txt | # For license information, please see license.txt | ||||
from __future__ import unicode_literals | |||||
import frappe | import frappe | ||||
from frappe.model.document import Document | from frappe.model.document import Document | ||||
from frappe import _ | 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.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 | from frappe.integrations.utils import make_get_request, make_post_request, create_request_log, create_payment_gateway | ||||
@@ -1,8 +1,6 @@ | |||||
# -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
# Copyright (c) 2018, Frappe Technologies and Contributors | # Copyright (c) 2018, Frappe Technologies and Contributors | ||||
# See license.txt | # See license.txt | ||||
from __future__ import unicode_literals | |||||
import unittest | import unittest | ||||
class TestStripeSettings(unittest.TestCase): | class TestStripeSettings(unittest.TestCase): | ||||
@@ -2,7 +2,6 @@ | |||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors | ||||
# For license information, please see license.txt | # For license information, please see license.txt | ||||
from __future__ import unicode_literals | |||||
import frappe | import frappe | ||||
from frappe.model.document import Document | from frappe.model.document import Document | ||||
@@ -1,8 +1,6 @@ | |||||
# -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors | ||||
# See license.txt | # See license.txt | ||||
from __future__ import unicode_literals | |||||
import frappe | import frappe | ||||
import unittest | import unittest | ||||
@@ -1,6 +1,5 @@ | |||||
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors | # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors | ||||
# License: GNU General Public License v3. See license.txt | # License: GNU General Public License v3. See license.txt | ||||
from __future__ import unicode_literals | |||||
import frappe | import frappe | ||||
from frappe import _ | from frappe import _ | ||||
from frappe.utils import flt | from frappe.utils import flt | ||||
@@ -1,7 +1,6 @@ | |||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors | ||||
# See license.txt | # See license.txt | ||||
from __future__ import unicode_literals | |||||
import frappe | import frappe | ||||
def get_context(context): | def get_context(context): | ||||
@@ -1,8 +1,6 @@ | |||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors | ||||
# See license.txt | # See license.txt | ||||
from __future__ import unicode_literals | |||||
import frappe | import frappe | ||||
no_cache = True | no_cache = True | ||||
@@ -1,6 +1,5 @@ | |||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors | ||||
# License: GNU General Public License v3. See license.txt | # License: GNU General Public License v3. See license.txt | ||||
from __future__ import unicode_literals | |||||
import frappe | import frappe | ||||
from frappe import _ | from frappe import _ | ||||
import json | import json | ||||
@@ -1,11 +1,9 @@ | |||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors | ||||
# License: GNU General Public License v3. See license.txt | # License: GNU General Public License v3. See license.txt | ||||
from __future__ import unicode_literals | |||||
import frappe | import frappe | ||||
from frappe import _ | from frappe import _ | ||||
from frappe.utils import flt, cint | from frappe.utils import flt, cint | ||||
import json | import json | ||||
from six import string_types | |||||
no_cache = 1 | no_cache = 1 | ||||
@@ -47,7 +45,7 @@ def get_api_key(): | |||||
def make_payment(razorpay_payment_id, options, reference_doctype, reference_docname, token): | def make_payment(razorpay_payment_id, options, reference_doctype, reference_docname, token): | ||||
data = {} | data = {} | ||||
if isinstance(options, string_types): | |||||
if isinstance(options, str): | |||||
data = json.loads(options) | data = json.loads(options) | ||||
data.update({ | data.update({ | ||||
@@ -1,6 +1,5 @@ | |||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors | ||||
# License: GNU General Public License v3. See license.txt | # License: GNU General Public License v3. See license.txt | ||||
from __future__ import unicode_literals | |||||
import frappe | import frappe | ||||
from frappe import _ | from frappe import _ | ||||
from frappe.utils import cint, fmt_money | from frappe.utils import cint, fmt_money | ||||