Selaa lähdekoodia

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

 Conflicts:
	frappe/__init__.py
pull/2/head
conncampbell 4 vuotta sitten
vanhempi
commit
8855a75606
17 muutettua tiedostoa jossa 9 lisäystä ja 31 poistoa
  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 Näytä tiedosto

@@ -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




+ 0
- 2
payments/payment_gateways/doctype/braintree_settings/test_braintree_settings.py Näytä tiedosto

@@ -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):


+ 1
- 2
payments/payment_gateways/doctype/paypal_settings/paypal_settings.py Näytä tiedosto

@@ -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
- 3
payments/payment_gateways/doctype/paytm_settings/paytm_settings.py Näytä tiedosto

@@ -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"






+ 0
- 2
payments/payment_gateways/doctype/paytm_settings/test_paytm_settings.py Näytä tiedosto

@@ -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




+ 1
- 2
payments/payment_gateways/doctype/razorpay_settings/razorpay_settings.py Näytä tiedosto

@@ -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,


+ 1
- 2
payments/payment_gateways/doctype/stripe_settings/stripe_settings.py Näytä tiedosto

@@ -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




+ 0
- 2
payments/payment_gateways/doctype/stripe_settings/test_stripe_settings.py Näytä tiedosto

@@ -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):


+ 0
- 1
payments/payments/doctype/payment_gateway/payment_gateway.py Näytä tiedosto

@@ -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




+ 0
- 2
payments/payments/doctype/payment_gateway/test_payment_gateway.py Näytä tiedosto

@@ -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




+ 2
- 2
payments/public/js/razorpay.js Näytä tiedosto

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


1. Include checkout script in your code 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 2. Create the Order controller in your backend
def get_razorpay_order(self): 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 Näytä tiedosto

@@ -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


+ 0
- 1
payments/templates/pages/payment_cancel.py Näytä tiedosto

@@ -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):


+ 0
- 2
payments/templates/pages/payment_success.py Näytä tiedosto

@@ -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




+ 0
- 1
payments/templates/pages/paytm_checkout.py Näytä tiedosto

@@ -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
- 3
payments/templates/pages/razorpay_checkout.py Näytä tiedosto

@@ -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({


+ 0
- 1
payments/templates/pages/stripe_checkout.py Näytä tiedosto

@@ -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


Ladataan…
Peruuta
Tallenna