Beispiel #1
0
# -*- coding: utf-8 -*-
# @The_author: Lenovo
# @Time    : 2020/2/12 15:56
import time
import requests
from SHDY.Public import   The_random_number
tradeNo = The_random_number.order_number()
from SHDY.Public.conf import Config
tradeNo =Config().get_param('tradeNo')
mercId = Config().get_param('mercIdshouchi')
# def get_order_code():
#     order_no = str(time.strftime('%Y%m%d%H%M%S', time.localtime(time.time())))+ str(time.time()).replace('.', '')[-7:]
#     return order_no
tradeDate = time.strftime("%Y%m%d", time.localtime())
#print(tradeDate)
#需要修改身份证号,手机号和卡号。风控限制
url = 'http://localhost:8080/DemoJava/settle/posMer/pay'
data = {
          "fee": "2",            #代付手续费
          "mercId": mercId,    #快速商户号  DYF801000326
          "orgNumber": "113",  #机构号
          "settAmt": "6",       #代付金额
          "tradeDate": tradeDate,
          "tradeNo": tradeNo,
          "tradeTime": "124433"
}
reg = requests.post(url, json=data).json()
print(reg)
Beispiel #2
0
# -*- coding: utf-8 -*-
# @The_author: Lenovo
# @Time    : 2020/2/17 11:21
import requests
from SHDY.Public import The_random_number
from SHDY.Public.conf import Config

order_no = The_random_number.order_number()
dy_mch_no = Config().get_param("mercid")
dy_mch_no1 = Config().get_param("id")
mer_order_no = Config().get_param('mer_order_no')
url = 'https://116.228.47.74:7443/transaction_agent/payBack/trans'
data ={
    "org_no": "121",
    "dy_mch_no": dy_mch_no,
    "mer_order_no": mer_order_no,           #下单流水号
    "order_no":order_no ,
    "service": "query",
    "sign": "121212"

}

re = requests.post(url,json=data,verify=False).json()
print(re)
Beispiel #3
0
# -*- coding: utf-8 -*-
# @The_author: Lenovo
# @Time    : 2020/2/10 17:26
import requests
from SHDY.Public import The_random_number as a
from SHDY.Public.conf import Config
from time import sleep
from selenium import webdriver

mercid = Config().get_param("mercid")
mercid1 = Config().get_param("id")
#_ocx_cvn2 ='123'
smsCode = '111111'
seqNo = a.order_number()
url = 'http://localhost:8080/DemoJava/cardSign/cardBind'
data = {
    'orgNumber': '121',  #机构号
    'dyMchNo': mercid,  #电银商户号
    'seqNo': seqNo,  #请求流水号
    'cardNo': '6221558812340013',  #银行卡号贷记卡
    'cardPhoneNo': '13552535506',  #银行卡预留手机号
    'cardIdNo': '341126197709218366',  #身份证号码
    'cardNm': '全渠道',  #身份证姓名
    'cardCvn2': '123',  #贷记卡安全码
    'cardExpired': '2311',  #贷记卡过期日期
    'frontUrl': 'www.baidu.com',  #前台通知地址
    'backUrl': 'www.baidu.com',  #后台通知地址
    'sign': 'e7lL0yjBgkgtFVCQE30VsJ1Gf0XjOhbFvUeJDdN6G3JVQGfH53'  #签名
}
reg = requests.post(url, json=data).json()
#re = json.dumps(reg,sort_keys=True,indent=2)
Beispiel #4
0
# -*- coding: utf-8 -*-
# @The_author: Lenovo
# @Time    : 2020/2/4 10:37
import requests
from SHDY.Public import The_random_number
from SHDY.Public.conf import Config

seqNo = The_random_number.order_number()
mercCnm = The_random_number.Company()
crpNm = The_random_number.get_name()
#crpIdNo = The_random_number.Id_card()
def merccnm():
     url = 'http://localhost:8080/DemoJava/fastMerchant/noCardPay/coming'
     data = {
          "orgNumber":"121",                  #机构代码
          "outMercId":"2165464446468",                     #外部商户号
          "seqNo":seqNo,                         #请求流水号
          "mercMbl":"13552535506",                       #商户手机号
          "mercCnm":mercCnm,                       #商户名称
          "mercAbbr":"商户",                      #商户简称
          "mccCd":"5812",                     #MCC码
          "mercProv":"2900",                  #归属省
          "mercCity":"2904",                  #归属市
          "mercCounty":"2904",                #归属县区
          "busAddr":"上海小卖部",                       #营业地址
          "crpIdTyp":"0",                     #法人证件类型
          "crpIdNo":"341126197709218366",                       #法人证件号码
          "crpNm":'全渠道',                         #法人姓名
          "crpExpDtD":"20991010",                     #法人证件过期日期
          "stlSign":"1",                              #结算账号公私标志
          "stlWcLbnkNo":"308651020015",                   #联行行号
# -*- coding: utf-8 -*-
# 作者   : Lenovo
# 时间   : 2020/4/9 13:37

import requests
from SHDY.Public import The_random_number
orderId = The_random_number.order_number()

url = 'http://192.168.28.79:8001/VerifySignAndSignController/Sign'
data = {
    "sourceData":
    "{\"head\":{\"version\":\"1.0\",\"reqTime\":\"20200325202716\",\"reqId\":\"2020032335567801763\",\"orgId\":\"127\"},\"body\":{\"tranCode\":\"AT002\",\"mercId\":\"872290453310066\",\"subMercId\":\"888888888888888\",\"trmId\":\"12345678\",\"orderId\":orderId,\"orderTime\":\"20200408221530\",\"orderDesc\":\"零食\",\"payType\":\"1\",\"crdNo\":\"6225802030041508\",\"transAmt\":\"10000\",\"mercFee\":\"10\",\"agtFeeAmt\":\"1.03\",\"subsidyAmt\":\"1.02\",\"batNo\":\"000001\",\"setDate\":\"20200327\",\"uniOrderId\":\"20190203\",\"crdFlg\":\"00\",\"transType\":\"0\",\"replay\":\"Y\",\"stationInfo\":\"MCC|MNC|LAC|CID\"}}",
    "privateKeyIndex": "08"
}

a = requests.post(url, json=data).json()
b = a["signData"]
print(b)

url = 'http://192.168.20.36:8090/trade/data/receive'
data = {
    "head": {
        "version": "1.0",
        "reqTime": "20200325202716",
        "reqId": "2020032335567801763",
        "orgId": "127"
    },
    "sign": b,
    "body": {
        "tranCode": "AT002",
        "mercId": "872290453310066",
# -*- coding: utf-8 -*-
# @The_author: Lenovo
# @Time    : 2020/2/4 14:53
import requests
from SHDY.Public import The_random_number
from SHDY.Public.conf import Config
seqNo = The_random_number.order_number()
mercCnm = The_random_number.Company()
mercid = Config().get_param("mercid")
stlOac = The_random_number.credit_card_number()
#print(stlOac)
url = 'http://localhost:8080/DemoJava/fastMerchant/noCardPay/updCardInfo'
data = {
    "orgNumber": "121",  #机构代码
    "mercId": mercid,  #电银商户号
    "seqNo": seqNo,  #请求流水号
    "stlOac": '6210951573972556824',  #银行账号借记卡
    "mercMbl": "17688888889",  #预留手机号
    "stlWcLbnkNo": "307100003019",  #联行行号
    "sign": "string"  #签名
}
reg = requests.post(url, json=data).json()
print(reg)
# -*- coding: utf-8 -*-
# 作者  : 一蓑烟雨任平生
# 时间  : 2020/1/6 13:59
import requests
from SHDY.Public import The_random_number
from SHDY.Public.conf import Config
#mercid = Config().get_param("mercid")
seqNo = The_random_number.order_number()
phon = The_random_number.get_phone()
mercCnm = The_random_number.get_name()
busAddr = The_random_number.Business_address()
crpIdNo = The_random_number.Id_card()
crpNm = The_random_number.get_name()
usrOprEmail = The_random_number.email()
mercId = The_random_number.credit_card_number()

#print(mercid)
url = 'http://localhost:8080/DemoJava/fastMerchant/pos/inComing'
data = {
        'orgNumber': '113',  # 机构代码
        'mercId': mercId,  # 快速商户号
        # 'mercId': '4468165499760',  # 快速商户号手动输入
        'synType': '0',  # 同步类型 0-新增 1-修改
        'seqNo': seqNo,  # 请求流水号
        'mercMbl': phon,  # 商户手机号
        # 'mercMbl': '13818765279',  # 商户手机号
        'mercCnm': mercCnm,  # 商户名称
        'mercAbbr': mercCnm,  # 商户简称
        # 'mercCnm': '杰',  # 商户名称
        # 'mercAbbr': '杰',  # 商户简称
        'mccCd': '7999',  # MCC码
Beispiel #8
0
# _*_ coding: utf-8 _*_
# 作者    : 一蓑烟雨任平生
# 创建时间 : 2019/12/30 16:41
import requests
from SHDY.Public import The_random_number
from tem import globalParam

logNo = The_random_number.credit_card_number()
globalParam.save_orderNum(logNo)

url = 'http://116.228.47.74:18280/merchant_agent/rest/fractionalTransfer/req'
data = {
    'memberId': '00005',  # 代理商编号
    'orgNo': '101',  #机构号
    'txnAmts': '66',  #金额
    'logNo': logNo  #流水号
}

reg = requests.post(url=url, json=data).json()
#Config.set_param('logNo',logNo)
print(reg)
Beispiel #9
0
# -*- coding: utf-8 -*-
# @The_author: Lenovo
# @Time    : 2020/2/4 10:37
import requests
from SHDY.Public import The_random_number
from SHDY.Public.conf import Config

seqNo = The_random_number.order_number()
mercCnm = The_random_number.Company()


def merccnm():
    url = 'http://localhost:8080/DemoJava/fastMerchant/noCard/pay/inComing'
    data = {
        "orgNumber": "121",  #机构代码
        "outMercId": "2165464446468",  #外部商户号
        "seqNo": seqNo,  #请求流水号
        "mercMbl": "13552535506",  #商户手机号
        "mercCnm": mercCnm,  #商户名称
        "mercAbbr": "商户",  #商户简称
        "mccCd": "5812",  #MCC码
        "mercProv": "2900",  #归属省
        "mercCity": "2904",  #归属市
        "mercCounty": "2904",  #归属县区
        "busAddr": "上海小卖部",  #营业地址
        "crpIdTyp": "0",  #法人证件类型
        "crpIdNo": "341126197709218366",  #法人证件号码3
        "crpNm": '全渠道',  #法人姓名3
        "crpExpDtD": "20991010",  #法人证件过期日期
        "stlSign": "1",  #结算账号公私标志
        "stlWcLbnkNo": "308651020015",  #联行行号
Beispiel #10
0
# -*- coding: utf-8 -*-
import requests
from SHDY.Public import The_random_number

seqNo = The_random_number.order_number()
mercCnm = The_random_number.get_name()

url = 'http://116.228.47.74:18280/merchant_agent/rest/merchantInfo/updateMerInfoByDyMchNo'
data = {
    'seqNo': seqNo,  #流水号
    'mercType': '3',  #快速、标准1 快速(秒过)2 标准(审核)3 小微(审核)
    'updType': '2',  #类型 1基本 2结算 3费率 4状态
    'mercId': '101290148160000',  #电银商户号
    #'unionFlg':'1',	           #是否开通云闪付
    #'mchStatus':'0',	           #商户状态0:正常 1:关闭
    #'settStatus':'0',	           #商户结算状态0 – 正常 1 – 关闭
    #'mercMbl':'13119188213',	   #商户手机号
    #'mercCnm':'后天赵人昆',	   #商户名称
    #'stlSign':'0',	               #结算账号公私标志0:对公 1:对私  2
    #'mercStlFlg':'0',	           #商户结算实时标志0:实时 1:非实时 2
    #'bankNm':'中国银行',	       #银行名称  2
    #'opnBnkProv':'01',	           #支行归属省份  2
    #'opnBnkCity':'100',	       #支行归属地市  2
    #'stlWcLbnkNo':'313100001467', #联行行号  2
    #'stlOpnBnkDesc':'中国银行股份有限公司北京分行',	#结算银行名称   2
    #'expDtD':'20201118',	                        #协议到期日
    'debitFee': '0.0068',  #借记费率  3
    'debitFeeLimit': '30.00',  #借记封顶额   3
    'creditFee': '0.0068',  #贷记费率   3
    'creditFeeLimit': '99999',  #贷记封顶额
    'dFee': '0.001',  #D0费率    3
Beispiel #11
0
# -*- coding: utf-8 -*-
import requests
from SHDY.Public import The_random_number
from SHDY.Public.conf import Config

seqNo = The_random_number.order_number()
mercMbl = The_random_number.get_phone()
# mercCnm = The_random_number.()
mercId = Config().get_param("MER")

url = 'http://192.168.20.171:8080/DemoJava/standardMerchant/upd'
data = {
    'orgNumber': '127',  # 机构代码
    'seqNo': seqNo,  # 流水号
    'updType': '2',  # 类型  1基本   2结算   3费率   5 协议补充
    'mercId': mercId,  # 电银商户号
    'mchStatus': '0',  # 商户状态0:正常 1:关闭
    'settStatus': '0',  # 商户结算状态  0 – 正常 1 – 关闭
    'mercMbl': '17653288603',  # 商户手机号   1
    'mercCnm': '大地李初',  # 商户名称     1
    'stlSign': '0',  # 结算账号公私标志  0:对公 1:对私   2
    'stlWcLbnkNo': '309290000480',  # 联行行号                       2
    'stlOac': '216490100100122275',  # 银行账号                           2
    'bnkAcnm': '忆洋',  # 银行开户名称                      2
    'debitFee': '0.005',  # 借记费率
    'debitFeeLimit': '25',  # 借记封顶额
    'creditFee': '0.005',  # 贷记费率
    'd0Fee': '0.0055',  # D0额外手续费费率
    'd0FeeQuota': '',  # D0额外定额手续费
    'unionCreditFee': '0.005',  # 云闪付贷记费率
    'unionDebitFee': '0.005',  # 云闪付借记费率
Beispiel #12
0
# -*- coding: utf-8 -*-
# @The_author: Lenovo
# @Time    : 2020/2/10 18:57
import requests
from SHDY.Public import The_random_number as a
from SHDY.Public.conf import Config
orderNo = a.order_number()
merOrderNo = Config().get_param('merOrderNo')
dyMchNo = Config().get_param("mercid")
dyMchNo1 = Config().get_param("id")
url = 'https://116.228.47.74:7443/transaction_agent/card/qryOrder'
data = {
            "orgNo": "121",
            "dyMchNo": dyMchNo,
            "orderNo": orderNo,  #流水号
            "merOrderNo": merOrderNo,
            "qryType": "0",    #0:消费状态;1:结算状态
            "sign": "ccccccccc"
}
reg = requests.post(url,json=data).json()
print(reg)