Python使用SHA1withRsa算法实现签名
代码
biz_content = {"amount": int(money) * 100,
"pay_type": "KJ-UY",
"merType": "1",
"tradeName": "充值{}".format(int(time.time())),
"bank_no": "1031000",
"back_notify_url": "http://192.168.0.170:8005/online",
'front_notify_url': 'http://192.168.0.225:8888/dist/view/chongzhi/',
"out_trade_no": out_trade_no,
"remark": "0"
}
timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(int(time.time()))),
merchant_no = 'M1001431901xxx'
method = 'jypay.pay.eacq.merchant.pay'
version = '1.0'
dict_map = {'biz_content': json.dumps(biz_content), 'merchant_no': merchant_no, 'method': method, 'version': version, 'timestamp': timestamp[0]}
dict_map['sign'] = content_sign(dict_map)
def content_sign(