MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / stripePreTopUp

Function stripePreTopUp

web/src/pages/TopUp/index.js:241–260  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

239 };
240
241 const stripePreTopUp = async () => {
242 if (!enableStripeTopUp) {
243 showError(t('管理员未开启在线充值!'));
244 return;
245 }
246 setPayWay('stripe');
247 setPaymentLoading(true);
248 try {
249 await getStripeAmount();
250 if (stripeTopUpCount < stripeMinTopUp) {
251 showError(t('充值数量不能小于') + stripeMinTopUp);
252 return;
253 }
254 setStripeOpen(true);
255 } catch (error) {
256 showError(t('获取金额失败'));
257 } finally {
258 setPaymentLoading(false);
259 }
260 };
261
262 const onlineStripeTopUp = async () => {
263 if (stripeAmount === 0) {

Callers 1

index.jsFile · 0.85

Calls 3

showErrorFunction · 0.90
getStripeAmountFunction · 0.85
tFunction · 0.50

Tested by

no test coverage detected