def get_gateway_details(args):
 if args.get(u'payment_gateway'):
  return get_payment_gateway_account(args.get(u'payment_gateway'))
 if args.cart:
  payment_gateway_account = frappe.get_doc(u'Shopping Cart Settings').payment_gateway_account
  return get_payment_gateway_account(payment_gateway_account)
 gateway_account = get_payment_gateway_account({u'is_default': 1})
 return gateway_account

def get_gateway_details ( args ) : if args . get ( u'payment_gateway' ) : return get_payment_gateway_account ( args . get ( u'payment_gateway' ) ) if args . cart : payment_gateway_account = frappe . get_doc ( u'Shopping Cart Settings' ) . payment_gateway_account return get_payment_gateway_account ( payment_gateway_account ) gateway_account = get_payment_gateway_account ( { u'is_default' : 1 } ) return gateway_account
return gateway and payment account of default payment gateway .