mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-16 07:43:50 +08:00
fix: fix pemContent decode error bug for WeChat Pay provider (#1751)
This commit is contained in:
@ -33,7 +33,7 @@ func GetPaymentProvider(typ string, appId string, clientSecret string, host stri
|
|||||||
return NewGcPaymentProvider(appId, clientSecret, host), nil
|
return NewGcPaymentProvider(appId, clientSecret, host), nil
|
||||||
} else if typ == "WeChat Pay" {
|
} else if typ == "WeChat Pay" {
|
||||||
// appId, mchId, mchCertSerialNumber, apiV3Key, privateKey
|
// appId, mchId, mchCertSerialNumber, apiV3Key, privateKey
|
||||||
newWechatPaymentProvider, err := NewWechatPaymentProvider(clientId2, appId, authorityPublicKey, clientSecret, appPrivateKey)
|
newWechatPaymentProvider, err := NewWechatPaymentProvider(clientId2, appId, appCertificate, clientSecret, appPrivateKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -821,6 +821,20 @@ class ProviderEditPage extends React.Component {
|
|||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
) : null
|
) : null
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
this.state.provider.type === "WeChat Pay" ? (
|
||||||
|
<Row style={{marginTop: "20px"}} >
|
||||||
|
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
|
||||||
|
{Setting.getLabel("cert", "cert")} :
|
||||||
|
</Col>
|
||||||
|
<Col span={22} >
|
||||||
|
<Input value={this.state.provider.cert} onChange={e => {
|
||||||
|
this.updateProviderField("cert", e.target.value);
|
||||||
|
}} />
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
) : null
|
||||||
|
}
|
||||||
{this.getAppIdRow(this.state.provider)}
|
{this.getAppIdRow(this.state.provider)}
|
||||||
<Row style={{marginTop: "20px"}} >
|
<Row style={{marginTop: "20px"}} >
|
||||||
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
|
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
|
||||||
|
Reference in New Issue
Block a user