
import frappe
from six import string_types
from siscohealth.medicare.auth import OAuth2Config
@frappe.whitelist()
def  redirect(**kwargs):
        doc = frappe.get_doc("Medicare Setting", "Medicare Setting")
        if kwargs and isinstance(kwargs, string_types):
                kwargs = json.loads(kwargs)

        code = kwargs.get("code")
        client = OAuth2Config()
        res = client.get_access_token(code)
        print(res.json())
        

435ca7ba88f229210325ba8c31726d5e4f0673c0
<mask token>

<mask token>


@frappe.whitelist()
def redirect(**kwargs):
    doc = frappe.get_doc('Medicare Setting', 'Medicare Setting')
    if kwargs and isinstance(kwargs, string_types):
        kwargs = json.loads(kwargs)
    code = kwargs.get('code')
    client = OAuth2Config()
    res = client.get_access_token(code)
    print(res.json())

import frappe
from six import string_types
from siscohealth.medicare.auth import OAuth2Config


@frappe.whitelist()
def redirect(**kwargs):
    doc = frappe.get_doc('Medicare Setting', 'Medicare Setting')
    if kwargs and isinstance(kwargs, string_types):
        kwargs = json.loads(kwargs)
    code = kwargs.get('code')
    client = OAuth2Config()
    res = client.get_access_token(code)
    print(res.json())


import frappe
from six import string_types
from siscohealth.medicare.auth import OAuth2Config
@frappe.whitelist()
def  redirect(**kwargs):
        doc = frappe.get_doc("Medicare Setting", "Medicare Setting")
        if kwargs and isinstance(kwargs, string_types):
                kwargs = json.loads(kwargs)

        code = kwargs.get("code")
        client = OAuth2Config()
        res = client.get_access_token(code)
        print(res.json())
        
