Add DummyPaymentProvider

This commit is contained in:
Yang Luo
2023-05-30 23:25:58 +08:00
parent 10e66f8020
commit fb1db7823b
6 changed files with 72 additions and 9 deletions

View File

@ -151,7 +151,9 @@ class ProductBuyPage extends React.Component {
getPayButton(provider) {
let text = provider.type;
if (provider.type === "Alipay") {
if (provider.type === "Dummy") {
text = i18next.t("product:Dummy");
} else if (provider.type === "Alipay") {
text = i18next.t("product:Alipay");
} else if (provider.type === "WeChat Pay") {
text = i18next.t("product:WeChat Pay");

View File

@ -305,7 +305,7 @@ class ProviderEditPage extends React.Component {
} else if (value === "SAML") {
this.updateProviderField("type", "Aliyun IDaaS");
} else if (value === "Payment") {
this.updateProviderField("type", "Alipay");
this.updateProviderField("type", "PayPal");
} else if (value === "Captcha") {
this.updateProviderField("type", "Default");
} else if (value === "AI") {

View File

@ -163,6 +163,10 @@ export const OtherProviderInfo = {
},
},
Payment: {
"Dummy": {
logo: `${StaticBaseUrl}/img/payment_paypal.png`,
url: "",
},
"Alipay": {
logo: `${StaticBaseUrl}/img/payment_alipay.png`,
url: "https://www.alipay.com/",
@ -848,6 +852,7 @@ export function getProviderTypeOptions(category) {
]);
} else if (category === "Payment") {
return ([
{id: "Dummy", name: "Dummy"},
{id: "Alipay", name: "Alipay"},
{id: "WeChat Pay", name: "WeChat Pay"},
{id: "PayPal", name: "PayPal"},