Esempio n. 1
0
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# 作者   : Lenovo
# 时间   : 2020/6/4 10:12
import requests
from SHDY.Public import data, conf

seqo = data.Mock().get_time()
print(seqo)
# merid = data.Data().Data_merchants()['HH快速商户']
# merid = data.Data().Data_merchants()['HH小微商户']
merid = data.Data().Data_merchants()['HH标准商户']

bar_code = '287569781775576805'
pay_amount = '1'
#以一下字段确认跳码
pick_mer_id = data.Data().Data_merchants()['HH池商户']
pick_term_no = '08000181'
# pick_mer_id = "872103658120708"     #872103658120708  872290476920001
# pick_term_no = '08231616'           #08231616  08000493
conf.Config().set_param('外部订单号', str(seqo))

url = 'http://192.168.31.161:18380/transaction_agent/scan/trans'
date = {
    "head": {
        "merc_id": merid,
        "pick_mer_id": pick_mer_id,
        "pick_term_no": pick_term_no,
        "station_info": "116.231280,40.220770&上海市浦东新区",  #跳码商户
        "trm_id": "08231257",
        "org_id": "101",
Esempio n. 2
0
# _*_ coding: utf-8 _*_
# 作者    : 一蓑烟雨任平生
# 创建时间 : 2020/1/2 18:27
import requests, json
from SHDY.Public import conf, data

mer_order_no = data.Mock().get_card_number()
print(mer_order_no)
bar_code = '134629715973960295'
pay_type = '01'  #支付方式  01 微信   02支付宝
merc_id = '872112378410001'
pay_amount = '1'  #金额(分)
conf.Config().set_param("mer_order_no", str(mer_order_no))

url = 'http://192.168.31.161:28380/test_agent/testScan/getSign'
data = {
    "body": {
        "trancde": "P00",
        "mer_order_no": mer_order_no,
        "pay_amount": pay_amount,
        "order_name": "testName",
        "pay_type": pay_type,
        "bar_code": bar_code
    },
    "head": {
        "trm_sn": "061310000003",
        "imei": "061310000003",
        "merc_id": merc_id,
        "trm_id": "08001435",
        "org_id": '125',
        "send_time": "20190813195059",
Esempio n. 3
0
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# 作者   : Lenovo
# 时间   : 2020/5/20 18:22
# -*- coding: utf-8 -*-
import time
from SHDY.Public import data_url, data, log, conf

log = log.logs()
url = data_url.Url().url()
date = data.Data()
usrNo = data.Mock().get_order()
uat = 'sit'

for i in range(2):
    ch = data_url.Driver().driver()
    ch.implicitly_wait(10)
    ch.maximize_window()
    ch.get(url[uat])
    ch.find_element_by_id('MercId').clear()
    ch.find_element_by_id('MercId').send_keys(date.Data_merchants()[uat +
                                                                    '商户'])
    ch.find_element_by_id('MerchantCertPass').clear()
    ch.find_element_by_id('MerchantCertPass').send_keys(
        date.Data_password()[uat])
    ch.find_element_by_xpath(
        '//html/body/center/form/table/tbody/tr[4]/td/input').click()

    #点击 快捷支付
    ch.find_element_by_xpath(
        '//html/body/center/form/table/tbody/tr[34]/td/a').click()
# -*- coding: utf-8 -*-
import time
from SHDY.Public import data_url, data, log, conf

url = data_url.Url().url()
mock = data.Mock()
data = data.Data()
ch = data_url.Driver().driver()

uat = "sit"
ch.implicitly_wait(5)
ch.get(url[uat])
ch.find_element_by_id('MercId').clear()
ch.find_element_by_id('MercId').send_keys(data.Data_merchants()[uat + '商户'])
ch.find_element_by_id('MerchantCertPass').clear()
ch.find_element_by_id('MerchantCertPass').send_keys(data.Data_password()[uat])
ch.find_element_by_xpath(
    '//html/body/center/form/table/tbody/tr[4]/td/input').click()
'''标准支付接口'''
ch.find_element_by_xpath(
    '//html/body/center/form/table/tbody/tr[45]/td/a').click()
time.sleep(1)
ch.find_element_by_xpath\
    ('/html/body/form/center/table/tbody/tr[6]/td[2]/input').clear()
ch.find_element_by_xpath\
    ('/html/body/form/center/table/tbody/tr[6]/td[2]/input').send_keys('1')

orderId = ch.find_element_by_xpath\
    ('/html/body/form/center/table/tbody/tr[4]/td[2]/input').get_attribute('value')
conf.Config().set_param(uat + '标准个人网银借记卡支付', orderId)
Esempio n. 5
0
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# 作者   : Lenovo
# 时间   : 2020/6/9 14:25
import requests
from SHDY.Public import data, conf
out_order_no = data.Mock().get_time()

url = 'http://192.168.31.161:18380/transaction_agent/scan/trans'
date = {
    "head": {
        "merc_id": "114305858120000",
        "trm_id": "08231257",
        "org_id": "101",
        "sign":
        "iJsiOwlvt0tclkkTlhEqQN1OtgOVnRlFOzfrIaJ44Bn2dDOdJapUvv8stnuXVvh+oznESu0P10yHjC8momjEjocYFqL16JVw0AH3w/VsJfXpfAV4vE9a8UQFVUIjtOJRpivCWttqF098kyb8nA8heYJsXij7HHKvH6JAyXKSBhE=",
        "dev_typ": "3",
        "ios_typ": "IOS",
        "ios_ver": "ios9.0",
        "dev_id": "868145017549928",
        "dev_bra_nm": "iPhone",
        "dev_mod_nm": "iPhone 11",
        "mac": "AA:BB:AA:DD:CC:FF",
        "ip_ver": "ipv4",
        "ip": "180.164.182.174",
        "pick_mer_id": "872290045110204",
        "pick_term_no": "08000181"
    },
    "body": {
        "mer_order_no": "5566383951532032",
        "out_order_no": out_order_no,
# -*- coding: utf-8 -*-
# @The_author: Lenovo
# @Time    : 2020/2/10 17:31
import requests, json
from SHDY.Public import data as a
from SHDY.Public.conf import Config
from selenium import webdriver
from time import sleep

dyMchNo = Config().get_param("mercid")
dyMchNo1 = Config().get_param("id")
orderNo = a.Mock().get_time()
card = '6221558812340000'  #贷记卡
name = '互联网'  #姓名
id_card = '341126197709218366'  #身份证
phon = '13552535506'  #手机号
cvn2 = '123'  #信用卡
time1 = '202311'  #时间
code = '111111'  #短信验证码
url = 'https://116.228.47.74:7443/transaction_agent/card/order'
data = {
    "orgNo":
    "121",  #机构号
    "dyMchNo":
    dyMchNo1,  #商户号
    "orderNo":
    orderNo,  #流水号
    "transAmount":
    "100",  #交易金额
    "tradeCode":
    "10001",  #快捷支付
# -*- coding: utf-8 -*-
# @The_author: Lenovo
# @Time    : 2020/2/4 15:37

import requests
from SHDY.Public import data
from SHDY.Public.conf import Config

seqNo = data.Mock().get_time()
mercCnm = data.Mock().get_Company()

url = 'http://192.168.20.171:18880/DemoJava/fastMerchant/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",  #法人证件号码
    "crpNm": "全渠道",  #法人姓名
    "crpExpDtD": "20991010",  #法人证件过期日期
    "stlSign": "1",  #结算账号公私标志
    "stlWcLbnkNo": "308651020015",  #联行行号
    "stlOac": '5200831111111113',  #银行账号贷记卡
Esempio n. 8
0
# _*_ coding: utf-8 _*_
# 作者    : 一蓑烟雨任平生
# 创建时间 : 2019/12/30 16:41
import requests
from SHDY.Public import data_url, data
logNo = data.Mock().get_card_number()

url = 'http://116.228.47.74:18280/merchant_agent/rest/agent/profit/pay'
data = {
    'agentNo': '00199',  #代理商编号
    'orgNo': '101',  #机构号
    'txnAmt': '1',  #金额
    'logNo': logNo  #流水号
}
reg = requests.post(url=url, json=data).json()
print(reg)
Esempio n. 9
0
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# 作者   : Lenovo
# 时间   : 2020/6/4 16:23
import requests, time
from SHDY.Public import data, conf, data_url

seqo = data.Mock().get_order()
merid = '10110348111008f'  # 快速商户
merid1 = '101290459460002'  # 小微商户
merid2 = '114305858120000'  # 标准商户

#以一下字段确认跳码
pick_mer_id = "872290045110204"
pick_term_no = '08000181'
# pick_mer_id = "872290476920001"
# pick_term_no = '08000493'
conf.Config().set_param('外部订单号', str(seqo))

url = 'http://192.168.31.161:18380/transaction_agent/scan/trans'
date = {
    "head": {
        "merc_id": merid2,
        "station_info": "",  #格式:LAT,LON|地理位置经纬度信息格式:LAT,LON
        "trm_id": "08231257",
        "org_id": "101",
        "sign":
        "Pkb9ZbxckUGvCU6BKafhBFm5U8hM5EWqRe6Ys09SSn2LkHYZpLmcJCchNfgAT8Gi0/aweZ8peSDu2BziNrLuj5HE6dgnbIsKPXy5jjduzzHv5oqAU7aXarDdBxcDRSrKPZOpZGTG80zgHJKMkRkpjpEMHr53A/nw79pbqVkwSf4=",
        "dev_typ": "3",
        "ios_typ": "IOS",
        "ios_ver": "ios9.0",