Code Duplication    Length = 11-11 lines in 3 locations

src/vnpayment/VerifiedData.php 1 location

@@ 42-52 (lines=11) @@
39
    /**
40
     * @inheritdoc
41
     */
42
    public function rules()
43
    {
44
        return [
45
            [['vnp_SecureHash'], 'required', 'on' => [
46
                PaymentGateway::VRC_PURCHASE_SUCCESS, PaymentGateway::VRC_IPN
47
            ]],
48
            [['vnp_SecureHash'], 'validateSecureHash', 'message' => '{attribute} is not valid!', 'on' => [
49
                PaymentGateway::VRC_PURCHASE_SUCCESS, PaymentGateway::VRC_IPN
50
            ]]
51
        ];
52
    }
53
54
    /**
55
     * Phương thức kiểm tra chữ ký dữ liệu có hợp lệ hay không từ VnPayment gửi sang.

src/vtcpay/VerifiedData.php 1 location

@@ 38-48 (lines=11) @@
35
    /**
36
     * @inheritdoc
37
     */
38
    public function rules()
39
    {
40
        return [
41
            [['signature'], 'required', 'on' => [
42
                PaymentGateway::VRC_PURCHASE_SUCCESS, PaymentGateway::VRC_IPN
43
            ]],
44
            [['signature'], 'validateSignature', 'message' => '{attribute} is not valid!', 'on' => [
45
                PaymentGateway::VRC_PURCHASE_SUCCESS, PaymentGateway::VRC_IPN
46
            ]]
47
        ];
48
    }
49
50
    /**
51
     * Phương thức kiểm tra chữ ký dữ liệu có hợp lệ hay không từ VTCPay gửi sang.

src/onepay/VerifiedData.php 1 location

@@ 39-49 (lines=11) @@
36
    /**
37
     * @inheritdoc
38
     */
39
    public function rules()
40
    {
41
        return [
42
            [['vpc_SecureHash'], 'required', 'on' => [
43
                PaymentGateway::VRC_IPN, PaymentGateway::VRC_PURCHASE_SUCCESS
44
            ]],
45
            [['vpc_SecureHash'], 'validateSecureHash', 'message' => '{attribute} is not valid!', 'on' => [
46
                PaymentGateway::VRC_IPN, PaymentGateway::VRC_PURCHASE_SUCCESS
47
            ]]
48
        ];
49
    }
50
51
    /**
52
     * Phương thức kiểm tra chữ ký dữ liệu nhận từ OnePay.