You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
775 B
PHTML
27 lines
775 B
PHTML
2 years ago
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace App\Request;
|
||
|
|
||
|
use Hyperf\Validation\Rule;
|
||
|
|
||
|
class JsapiPayRequest extends ApiRequest
|
||
|
{
|
||
|
public function rules(): array
|
||
|
{
|
||
|
return [
|
||
|
'order_name' => ['required', 'max:64'],
|
||
|
'out_order_no' => ['required', 'max:32'],
|
||
|
'amount' => ['required', Rule::in([5,10,20,30,50,80,98,198,298,398,498,598,698,798,898,998])],
|
||
|
'currency' => ['required', Rule::in(['CNY'])],
|
||
|
'show_pc_pay_url' => ['integer', Rule::in([1, 2])],
|
||
|
'direct_pay' => ['integer', Rule::in([1, 2])],
|
||
|
'notify_url' => ['required', 'url'],
|
||
|
'redirect_url' => ['required', 'url'],
|
||
|
'o_number' => ['max:32'],
|
||
|
'pos_no' => ['max:32'],
|
||
|
];
|
||
|
}
|
||
|
}
|