Skip to content

Commit

Permalink
Update pezesha_settings.py
Browse files Browse the repository at this point in the history
  • Loading branch information
erpbox-sols committed Apr 29, 2024
1 parent c6dfa86 commit 04d4837
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def validate(self):
@frappe.whitelist()
def pezesha_loan_offer(customer, pos_profile):
pos = frappe.get_doc("POS Profile", pos_profile)
print("----------", pos.custom_pezesha_channel_id)
pz_st = frappe.db.get_single_value('Pezesha Settings', 'authorization')
url = 'https://api.pezesha.com/mfi/v1/borrowers/options'
headers = {
Expand Down Expand Up @@ -62,14 +61,13 @@ def pezesha_loan_application(data, pos_profile):
res = json.loads(data)
pos = frappe.get_doc("POS Profile", pos_profile)
pz_st = frappe.db.get_single_value('Pezesha Settings', 'authorization')

url = 'https://api.pezesha.com/mfi/v1/borrowers/options'
url = 'https://api.pezesha.com/mfi/v1/borrowers/loans'
headers = {
'Authorization': f'Bearer {pz_st}'
}
data = {
'channel': 'VICTORY_FARMS_KAWANGWARE',
'identifier': 'VF-CUST-2023-10313',
'channel': pos.custom_pezesha_channel_id,
'identifier': res.get('pezesha_customer_id'),
'amount': res.get('amount'),
'duration': res.get('duration'),
'interest': res.get('interest'),
Expand Down

0 comments on commit 04d4837

Please sign in to comment.