Code Duplication    Length = 11-11 lines in 4 locations

src/onepay/VerifiedData.php 1 location

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

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/momo/VerifiedData.php 1 location

@@ 43-53 (lines=11) @@
40
    /**
41
     * @inheritdoc
42
     */
43
    public function rules()
44
    {
45
        return [
46
            [['signature'], 'required', 'on' => [
47
                PaymentGateway::VRC_PURCHASE_SUCCESS, PaymentGateway::VRC_IPN
48
            ]],
49
            [['signature'], 'signatureValidator', 'message' => '{attribute} is not valid!', 'on' => [
50
                PaymentGateway::VRC_PURCHASE_SUCCESS, PaymentGateway::VRC_IPN
51
            ]]
52
        ];
53
    }
54
55
    /**
56
     * @inheritdoc