Skip to content

Commit

Permalink
chore: fixed linters
Browse files Browse the repository at this point in the history
  • Loading branch information
pateljannat committed Sep 30, 2024
1 parent e87d8de commit 4ea0c93
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,5 @@ def get_gateway_controller(doctype, docname, payment_gateway=None):
if not payment_gateway:
reference_doc = frappe.get_doc(doctype, docname)
payment_gateway = reference_doc.payment_gateway
gateway_controller = frappe.db.get_value(
"Payment Gateway", payment_gateway, "gateway_controller"
)
gateway_controller = frappe.db.get_value("Payment Gateway", payment_gateway, "gateway_controller")
return gateway_controller
8 changes: 6 additions & 2 deletions payments/templates/pages/stripe_checkout.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ def get_context(context):
if not (set(expected_keys) - set(list(frappe.form_dict))):
for key in expected_keys:
context[key] = frappe.form_dict[key]
gateway_controller = get_gateway_controller(context.reference_doctype, context.reference_docname, context.payment_gateway)
gateway_controller = get_gateway_controller(
context.reference_doctype, context.reference_docname, context.payment_gateway
)
context.publishable_key = get_api_key(context.reference_docname, gateway_controller)
context.image = get_header_image(context.reference_docname, gateway_controller)

Expand Down Expand Up @@ -70,7 +72,9 @@ def get_header_image(doc, gateway_controller):


@frappe.whitelist(allow_guest=True)
def make_payment(stripe_token_id, data, reference_doctype=None, reference_docname=None, payment_gateway=None):
def make_payment(
stripe_token_id, data, reference_doctype=None, reference_docname=None, payment_gateway=None
):
data = json.loads(data)

data.update({"stripe_token_id": stripe_token_id})
Expand Down

0 comments on commit 4ea0c93

Please sign in to comment.