24 lines
1.1 KiB
JavaScript
24 lines
1.1 KiB
JavaScript
import React from 'react';
|
|
import { Form, Input } from 'antd';
|
|
export default function render(props) {
|
|
const { wechatPay, serverUrl } = props.data;
|
|
const { t, update } = props.methods;
|
|
if (wechatPay) {
|
|
return (<>
|
|
<Form.Item label={t('wechatPay:attr.payNotifyUrl')}>
|
|
<Input prefix={`${serverUrl}/endpoint`} suffix='/${payId}' value={wechatPay.payNotifyUrl} placeholder={t('placeholder.payNotifyUrl')} onChange={({ currentTarget }) => {
|
|
const payNotifyUrl = currentTarget.value;
|
|
update({ payNotifyUrl });
|
|
}}/>
|
|
</Form.Item>
|
|
<Form.Item label={t('wechatPay:attr.refundNotifyUrl')}>
|
|
<Input prefix={`${serverUrl}/endpoint`} suffix='/${refundId}' value={wechatPay.refundNotifyUrl} placeholder={t('placeholder.refundNotifyUrl')} onChange={({ currentTarget }) => {
|
|
const refundNotifyUrl = currentTarget.value;
|
|
update({ refundNotifyUrl });
|
|
}}/>
|
|
</Form.Item>
|
|
</>);
|
|
}
|
|
return null;
|
|
}
|