You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#We are using python hashlib lib for make signature using sha1
signature = hashlib.sha1(str.encode(signature_data))
signature = fingerprint.hexdigest()
b'{"message":"Authorization header requires 'Credential' parameter. Authorization header requires 'Signature' parameter. Authorization header requires 'SignedHeaders' parameter. Authorization header requires existence of either a 'X-Amz-Date' or a 'Date' header. Authorization=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6IjhkMTg2M2NkLTczOWMtNGIyMC05NTlkLTkxMTMwMmE0ZDNiZSIsImNvbXBhbnlJZCI6IjVlYjA1Mjg2NGJlMzdjMDAwNzdkN2NjMyIsImlhdCI6MTU4ODYyNDM1NiwiZXhwIjo0NzQ0Mjk3OTU2fQ.C_THR9zDZXMS_nlfoREXVA_E5H-wdzjw0n-AHdcvYM0"}\n'
Your response will be highly appreciated.
Thanks,
Smith
The text was updated successfully, but these errors were encountered:
Hello Team,
Please check request data and suggest us if anything wrong.
Http Requests Data:
import json
import requests
import hashlib
#"API Key" as know as "client secret"
header = {
'Authorization': ,
'Accept': "application/json",
'Content-Type': 'application/json'
}
url = "https://api.uat.merchants.bankofmaldives.com.mv/public"
signature_data = "amount=1¤cy=MVR&apiKey="
#We are using python hashlib lib for make signature using sha1
signature = hashlib.sha1(str.encode(signature_data))
signature = fingerprint.hexdigest()
data = {
"amount": 1,
"currency": "MVR",
"signature": signature,
"deviceId": "12345789",
"appVersion": "vendingSoftware1.0",
"apiVersion": "2.0",
"signMethod": "sha1",
'redirectUrl': "https://7355da23.ngrok.io",
"localId": "1234567890",
"customerReference": "invoice01",
}
request = requests.post(url, data=data, headers=header)
Request Response :
<Response [403]>
b'{"message":"Authorization header requires 'Credential' parameter. Authorization header requires 'Signature' parameter. Authorization header requires 'SignedHeaders' parameter. Authorization header requires existence of either a 'X-Amz-Date' or a 'Date' header. Authorization=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6IjhkMTg2M2NkLTczOWMtNGIyMC05NTlkLTkxMTMwMmE0ZDNiZSIsImNvbXBhbnlJZCI6IjVlYjA1Mjg2NGJlMzdjMDAwNzdkN2NjMyIsImlhdCI6MTU4ODYyNDM1NiwiZXhwIjo0NzQ0Mjk3OTU2fQ.C_THR9zDZXMS_nlfoREXVA_E5H-wdzjw0n-AHdcvYM0"}\n'
Your response will be highly appreciated.
Thanks,
Smith
The text was updated successfully, but these errors were encountered: