From d8528b4558e3a6cf054eba7754ea1b3a3d9569e3 Mon Sep 17 00:00:00 2001 From: emile Date: Mon, 8 Apr 2024 20:56:09 +0300 Subject: [PATCH] new --- .../__pycache__/views.cpython-310.pyc | Bin 2355 -> 2406 bytes osinaweb/customercore/views.py | 6 +++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/osinaweb/customercore/__pycache__/views.cpython-310.pyc b/osinaweb/customercore/__pycache__/views.cpython-310.pyc index de8cf3380ec94feca6af7565a84799962facb8d7..0a017929fe81b57fe6041cb47dcb403f1ffdebf9 100644 GIT binary patch delta 511 zcmXYtF>4e-6oBW=?(NRb?#|{e*_?^u5d#5U|*t-V$4R+35f%gbB>5ZjOH8@$EfD4F23vlgtmk+q_)dnLCgN& zt16)h)tE;V`Ley@4?b#V>Kbnbg>S&{173)e$GX<{FfzUo7*Cuc&^{^?^u;uou@MJG zEHOFa*-N6ZkUGKztdE(I(-<2w*rj`ppa@MkRk%p*XiiH+u}(~6VobmC5jAyrS+hr>fGYt`A#QhIz@!{OWG+$#SCB=*REQZHTX>0T$O1lXV$So7MHyPMdqc-GvgR1)`J53-&fWO=qui7d50#XV@-KVsv~ UZAwHef(XR*=B@-DTt}$jAIb)K;{X5v delta 519 zcmYL_F>4e-6vyYy?(NRZ&depZNsM|LMIs!DD8a@;gQ$pAiWF)P;mAuQu{hnE6oy$X zHWm_6glQ}U@B9Xm&th|(7M6ne1$?_ie8c?zA22UR8Ft2SpFUDSsk|C#%*Rk>4b2c~XME;0&VJ$* zJZ9^Rde7DUsx@lt44%RH9l*1A?uggrm^u6AJ+RUM+t0~--kW-a#@YSvOxRO~ErslW6FQNxZkWgOgURH^XxJ3~cz2K5P}Uw2kmR-AH=% zTJD6qVu1@CP+U${=%r`Fp;+rI5>6CuZ4QdQ8x+IhO8707VI^FYS1)y`sF?;0qB%TL Kz~yOX7XAXOiEs=6 diff --git a/osinaweb/customercore/views.py b/osinaweb/customercore/views.py index 7928f656..3bd77ac1 100644 --- a/osinaweb/customercore/views.py +++ b/osinaweb/customercore/views.py @@ -4,6 +4,8 @@ from django.http import JsonResponse import requests from .decorators import * import uuid +import json + # Create your views here. @customer_login_required @@ -60,11 +62,13 @@ def initiate_checkout(request): "order.description": "description_of_order" } + json_data = json.dumps(data) + # Set up Basic HTTP authentication auth = (api_username, api_password) try: - response = requests.post("https://creditlibanais-netcommerce.gateway.mastercard.com/api/rest/version/78/merchant/TEST06127800/session", data=data, auth=auth) + response = requests.post("https://creditlibanais-netcommerce.gateway.mastercard.com/api/rest/version/78/merchant/TEST06127800/session", json=json_data, auth=auth) print("Response Content:", response.content.decode()) # Print response content