# -*- 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)
예제 #2
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",
예제 #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()