oak-pay-business/es/components/payConfig/upsert/wechatPay/index.js

26 lines
1.1 KiB
JavaScript

import React from 'react';
import { Form, Input } from 'antd';
export default function WechatPay(props) {
const { config, update, t } = props;
return (<Form labelCol={{ span: 6 }} wrapperCol={{ span: 12 }} layout="horizontal" style={{ minWidth: 600 }}>
<Form.Item label="mchId">
<Input value={config.mchId} onChange={({ currentTarget }) => {
config.mchId = currentTarget.value;
update(config);
}}/>
</Form.Item>
<Form.Item label={t('label.privateKeyFilePath')}>
<Input value={config.privateKeyFilePath} placeholder={t('placeholder.privateKeyFilePath')} onChange={({ currentTarget }) => {
config.privateKeyFilePath = currentTarget.value;
update(config);
}}/>
</Form.Item>
<Form.Item label={t('label.publicKeyFilePath')}>
<Input value={config.publicKeyFilePath} placeholder={t('placeholder.publicKeyFilePath')} onChange={({ currentTarget }) => {
config.publicKeyFilePath = currentTarget.value;
update(config);
}}/>
</Form.Item>
</Form>);
}