protected function hasToken(IPaymentMethod $paymentMethod)
    {
        $tokenValue = null;

        if ($paymentMethod instanceof ITokenizable && !empty($paymentMethod->token)) {
            $tokenValue = $paymentMethod->token;
            return [true, $tokenValue];
        }

        return [false, $tokenValue];
    }
protected function hasToken(IPaymentMethod $paymentMethod)
    {
        $tokenValue = null;

        if ($paymentMethod instanceof ITokenizable && !empty($paymentMethod->token)) {
            $tokenValue = $paymentMethod->token;
            return [true, $tokenValue];
        }

        return [false, $tokenValue];
    }
protected function hasToken ( IPaymentMethod $ paymentMethod ) { $ tokenValue = null ; if ( $ paymentMethod instanceof ITokenizable && ! empty ( $ paymentMethod -> token ) ) { $ tokenValue = $ paymentMethod -> token ; return [ true , $ tokenValue ] ; } return [ false , $ tokenValue ] ; }
Tests the payment method for a token value

@param IPaymentMethod $paymentMethod The payment method

@return [bool, string|null]
Tests the payment method for a token value