diff --git a/plugins/Stripe/Lang/en/common.php b/plugins/Stripe/Lang/en/common.php index c63a6b45..0b0facaf 100644 --- a/plugins/Stripe/Lang/en/common.php +++ b/plugins/Stripe/Lang/en/common.php @@ -20,4 +20,9 @@ return [ 'cvv' => 'Cvv', 'remenber' => 'Keep this card in mind for future use', 'btn_submit' => 'Submit', + + 'error_cardnum' => 'Please enter the card number', + 'error_cvv' => 'Please enter the security code', + 'error_year' => 'Please select the year', + 'error_month' => 'Please select a month', ]; diff --git a/plugins/Stripe/Lang/zh_cn/common.php b/plugins/Stripe/Lang/zh_cn/common.php index 85a82b69..1925e8ef 100644 --- a/plugins/Stripe/Lang/zh_cn/common.php +++ b/plugins/Stripe/Lang/zh_cn/common.php @@ -20,4 +20,9 @@ return [ 'cvv' => '安全码', 'remenber' => '记住这张卡以便将来使用', 'btn_submit' => '提交支付', + + 'error_cardnum' => '请输入卡号', + 'error_cvv' => '请输入安全码', + 'error_year' => '请选择年', + 'error_month' => '请选择月', ]; diff --git a/plugins/Stripe/Views/checkout/payment.blade.php b/plugins/Stripe/Views/checkout/payment.blade.php index f94584a4..c3803ea7 100644 --- a/plugins/Stripe/Views/checkout/payment.blade.php +++ b/plugins/Stripe/Views/checkout/payment.blade.php @@ -65,22 +65,22 @@ rules: { cardnum: [{ required: true, - message: '请输入卡号', + message: "{{ __('Stripe::common.error_cardnum') }}", trigger: 'blur' }, ], cvv: [{ required: true, - message: '请输入安全码', + message: "{{ __('Stripe::common.error_cvv') }}", trigger: 'blur' }, ], year: [{ required: true, - message: '请选择年', + message: "{{ __('Stripe::common.error_year') }}", trigger: 'blur' }, ], month: [{ required: true, - message: '请选择月', + message: "{{ __('Stripe::common.error_month') }}", trigger: 'blur' }, ], } @@ -94,7 +94,7 @@ checkedBtnCheckoutConfirm(form) { this.$refs[form].validate((valid) => { if (!valid) { - this.$message.error('请检查表单是否填写正确'); + // this.$message.error('请检查表单是否填写正确'); return; }