feat(payment): tighten gateways and implement Epay
Keep only balance, Alipay, WeChat, PayPal, Stripe, Epay, and card-pass channels; remove placeholder aggregators. Add dual-channel Epay gateway with MD5 notify/return, register cashier methods, and gate card-pass redeem behind the payment channel switch. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
aa4bdfb5c4
commit
723dd180e4
11 files changed
+470
-264
No files matched your search
@@ -95,24 +95,12 @@ class ProductService {
|
||||
];
|
||||
}
|
||||
|
||||
$manual = true;
|
||||
if (class_exists('\AKSRT\Settings\Settings')) {
|
||||
$gw = \AKSRT\Settings\Settings::get_payment_gateway_settings();
|
||||
$manual = !empty($gw['manual_review']) || ($gw['mode'] ?? '') === 'manual_review';
|
||||
}
|
||||
if ($manual) {
|
||||
$methods['manual_review'] = [
|
||||
'value' => 'manual_review',
|
||||
'label' => __('人工确认', 'aksrt'),
|
||||
'description' => __('保留待支付订单,后续由管理员确认。', 'aksrt'),
|
||||
];
|
||||
}
|
||||
|
||||
// Fallback only when no configured gateways (and no points).
|
||||
if (empty($methods)) {
|
||||
$methods['manual_review'] = [
|
||||
'value' => 'manual_review',
|
||||
'label' => __('人工确认', 'aksrt'),
|
||||
'description' => __('保留待支付订单,后续由管理员确认。', 'aksrt'),
|
||||
'description' => __('暂无可用支付网关,保留待支付订单由管理员确认。', 'aksrt'),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -131,6 +119,10 @@ class ProductService {
|
||||
return __('跳转 PayPal 完成支付。', 'aksrt');
|
||||
case 'stripe':
|
||||
return __('跳转 Stripe Checkout 完成支付。', 'aksrt');
|
||||
case 'epay_alipay':
|
||||
return __('经易支付跳转支付宝完成支付。', 'aksrt');
|
||||
case 'epay_wxpay':
|
||||
return __('经易支付跳转微信完成支付。', 'aksrt');
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user